Documentation ¶
Index ¶
- type EthClient
- func (ec *EthClient) FilterLogs(query ethereum.FilterQuery) ([]types.Log, error)
- func (ec *EthClient) GetBalance(account common.Address) (*big.Int, error)
- func (ec *EthClient) GetLatestBlockNumber() (uint64, error)
- func (ec *EthClient) GetTransactionByHash(hash common.Hash) (*types.Transaction, bool, error)
- func (ec *EthClient) GetTransactionReceipt(hash common.Hash) (*types.Receipt, error)
- func (ec *EthClient) SendTransaction(tx *types.Transaction) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthClient ¶
type EthClient struct {
// contains filtered or unexported fields
}
EthClient wraps ethereum client for convenient use.
func NewEthClient ¶
NewEthClient creates a new EthClient instance.
func (*EthClient) FilterLogs ¶
FilterLogs filters logs based on the given query.
func (*EthClient) GetBalance ¶
GetBalance retrieves the balance of the given account address.
func (*EthClient) GetLatestBlockNumber ¶
GetLatestBlockNumber retrieves the block number of the latest block.
func (*EthClient) GetTransactionByHash ¶
GetTransactionByHash returns the transaction for the given hash.
func (*EthClient) GetTransactionReceipt ¶
GetTransactionReceipt returns the receipt for the given transaction hash.
func (*EthClient) SendTransaction ¶
func (ec *EthClient) SendTransaction(tx *types.Transaction) error
SendTransaction sends the given transaction to blockchain.
Click to show internal directories.
Click to hide internal directories.