Documentation ¶
Index ¶
- type EthBlockChainRPC
- func (rpc EthBlockChainRPC) GetBlockByNum(num uint64) (blockchain.Block, error)
- func (rpc EthBlockChainRPC) GetCurrentBlockNum() (uint64, error)
- func (rpc EthBlockChainRPC) GetLiteBlockByNum(num uint64) (blockchain.Block, error)
- func (rpc EthBlockChainRPC) GetLogs(fromBlockNum, toBlockNum uint64, addresses []string, topics []string) ([]blockchain.IReceiptLog, error)
- func (rpc EthBlockChainRPC) GetTransactionReceipt(txHash string) (blockchain.TransactionReceipt, error)
- type EthBlockChainRPCWithRetry
- func (rpc EthBlockChainRPCWithRetry) GetBlockByNum(num uint64) (rst blockchain.Block, err error)
- func (rpc EthBlockChainRPCWithRetry) GetCurrentBlockNum() (rst uint64, err error)
- func (rpc EthBlockChainRPCWithRetry) GetLiteBlockByNum(num uint64) (rst blockchain.Block, err error)
- func (rpc EthBlockChainRPCWithRetry) GetLogs(fromBlockNum, toBlockNum uint64, addresses []string, topics []string) (rst []blockchain.IReceiptLog, err error)
- func (rpc EthBlockChainRPCWithRetry) GetTransactionReceipt(txHash string) (rst blockchain.TransactionReceipt, err error)
- type IBlockChainRPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthBlockChainRPC ¶
type EthBlockChainRPC struct {
// contains filtered or unexported fields
}
func (EthBlockChainRPC) GetBlockByNum ¶
func (rpc EthBlockChainRPC) GetBlockByNum(num uint64) (blockchain.Block, error)
func (EthBlockChainRPC) GetCurrentBlockNum ¶
func (rpc EthBlockChainRPC) GetCurrentBlockNum() (uint64, error)
func (EthBlockChainRPC) GetLiteBlockByNum ¶
func (rpc EthBlockChainRPC) GetLiteBlockByNum(num uint64) (blockchain.Block, error)
func (EthBlockChainRPC) GetLogs ¶
func (rpc EthBlockChainRPC) GetLogs( fromBlockNum, toBlockNum uint64, addresses []string, topics []string, ) ([]blockchain.IReceiptLog, error)
func (EthBlockChainRPC) GetTransactionReceipt ¶
func (rpc EthBlockChainRPC) GetTransactionReceipt(txHash string) (blockchain.TransactionReceipt, error)
type EthBlockChainRPCWithRetry ¶
type EthBlockChainRPCWithRetry struct { *EthBlockChainRPC // contains filtered or unexported fields }
func NewEthRPCWithRetry ¶
func NewEthRPCWithRetry(api string, maxRetryCount int, options ...func(rpc *ethrpc.EthRPC)) *EthBlockChainRPCWithRetry
func (EthBlockChainRPCWithRetry) GetBlockByNum ¶
func (rpc EthBlockChainRPCWithRetry) GetBlockByNum(num uint64) (rst blockchain.Block, err error)
func (EthBlockChainRPCWithRetry) GetCurrentBlockNum ¶
func (rpc EthBlockChainRPCWithRetry) GetCurrentBlockNum() (rst uint64, err error)
func (EthBlockChainRPCWithRetry) GetLiteBlockByNum ¶
func (rpc EthBlockChainRPCWithRetry) GetLiteBlockByNum(num uint64) (rst blockchain.Block, err error)
func (EthBlockChainRPCWithRetry) GetLogs ¶
func (rpc EthBlockChainRPCWithRetry) GetLogs( fromBlockNum, toBlockNum uint64, addresses []string, topics []string, ) (rst []blockchain.IReceiptLog, err error)
func (EthBlockChainRPCWithRetry) GetTransactionReceipt ¶
func (rpc EthBlockChainRPCWithRetry) GetTransactionReceipt(txHash string) (rst blockchain.TransactionReceipt, err error)
type IBlockChainRPC ¶
type IBlockChainRPC interface { GetCurrentBlockNum() (uint64, error) GetBlockByNum(uint64) (blockchain.Block, error) GetLiteBlockByNum(uint64) (blockchain.Block, error) GetTransactionReceipt(txHash string) (blockchain.TransactionReceipt, error) GetLogs(from, to uint64, address []string, topics []string) ([]blockchain.IReceiptLog, error) }
Click to show internal directories.
Click to hide internal directories.