Documentation ¶
Index ¶
- type Client
- func (ec Client) BlockConfirmations() uint64
- func (ec *Client) ChainID(ctx context.Context) (*big.Int, error)
- func (ec *Client) GetBlockTimestamp(blockNumber *big.Int) uint64
- func (ec *Client) GetChainID() uint64
- func (ec *Client) GetClient() client.Core
- func (ec *Client) GetPrivateKey() string
- func (ec Client) RetryBlockNumber() (uint64, error)
- func (ec Client) RetryFilterLogs(query ethereum.FilterQuery) ([]types.Log, error)
- func (ec *Client) RetryTransactionByHash(hash common.Hash) (*types.Transaction, error)
- func (ec *Client) SetChainID(chainId uint64)
- func (ec *Client) ValidateContractDeployedAt(contractAddress string) (*common.Address, error)
- func (ec *Client) WaitForConfirmations(raw types.Log) error
- func (ec *Client) WaitForTransactionCallback(hex string, onSuccess, onRevert func(), onError func(err error))
- func (ec *Client) WaitForTransactionReceipt(hash common.Hash) (txReceipt *types.Receipt, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client EVM JSON RPC Client
func (Client) BlockConfirmations ¶
func (*Client) GetBlockTimestamp ¶
GetBlockTimestamp retrieves the timestamp of the given block
func (*Client) GetChainID ¶
func (*Client) GetClient ¶
GetClient returns the instance of an ethclient already established connection to a JSON RPC EVM Node
func (*Client) GetPrivateKey ¶
func (Client) RetryBlockNumber ¶
RetryBlockNumber returns the most recent block number Uses a retry mechanism in case the filter query is stuck
func (Client) RetryFilterLogs ¶
RetryFilterLogs returns the logs from the input query Uses a retry mechanism in case the filter query is stuck
func (*Client) RetryTransactionByHash ¶
func (*Client) SetChainID ¶
func (*Client) ValidateContractDeployedAt ¶
ValidateContractDeployedAt performs validation that a smart contract is deployed at the provided address
func (*Client) WaitForTransactionCallback ¶
func (ec *Client) WaitForTransactionCallback(hex string, onSuccess, onRevert func(), onError func(err error))
WaitForTransactionCallback waits for transaction receipt and depending on receipt status calls one of the provided functions onSuccess is called once the TX is successfully mined onRevert is called once the TX is mined but it reverted onError is called if an error occurs while waiting for TX to go into one of the other 2 states