Documentation ¶
Index ¶
- type EthBlockChainRPCWithRetry
- func (rpc EthBlockChainRPCWithRetry) BlockByNumber(ctx context.Context, number *big.Int) (rst *types.Block, err error)
- func (rpc EthBlockChainRPCWithRetry) BlockNumber(ctx context.Context) (rst uint64, err error)
- func (rpc EthBlockChainRPCWithRetry) FilterLogs(ctx context.Context, query ethereum.FilterQuery) (rst []types.Log, err error)
- func (rpc EthBlockChainRPCWithRetry) HeaderByNumber(ctx context.Context, number *big.Int) (rst *types.Header, err error)
- func (rpc EthBlockChainRPCWithRetry) TransactionReceipt(ctx context.Context, txHash common.Hash) (rst *types.Receipt, err error)
- type IBlockChainRPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthBlockChainRPCWithRetry ¶
type EthBlockChainRPCWithRetry struct { *ethclient.Client // contains filtered or unexported fields }
func NewEthRPCWithRetry ¶
func NewEthRPCWithRetry(api string, maxRetryCount int) (*EthBlockChainRPCWithRetry, error)
func (EthBlockChainRPCWithRetry) BlockByNumber ¶
func (EthBlockChainRPCWithRetry) BlockNumber ¶
func (rpc EthBlockChainRPCWithRetry) BlockNumber(ctx context.Context) (rst uint64, err error)
func (EthBlockChainRPCWithRetry) FilterLogs ¶
func (EthBlockChainRPCWithRetry) HeaderByNumber ¶
func (EthBlockChainRPCWithRetry) TransactionReceipt ¶
type IBlockChainRPC ¶
type IBlockChainRPC interface { BlockNumber(ctx context.Context) (uint64, error) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error) }
Click to show internal directories.
Click to hide internal directories.