Documentation
¶
Index ¶
- type EthClientWrapper
- func (w *EthClientWrapper) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
- func (w *EthClientWrapper) BlockNumber(ctx context.Context) (uint64, error)
- func (w *EthClientWrapper) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (w *EthClientWrapper) ChainID(ctx context.Context) (*big.Int, error)
- func (w *EthClientWrapper) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- func (w *EthClientWrapper) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
- func (w *EthClientWrapper) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
- func (w *EthClientWrapper) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (w *EthClientWrapper) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (w *EthClientWrapper) LatestBlockTime(ctx context.Context) (time.Time, error)
- func (w *EthClientWrapper) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
- func (w *EthClientWrapper) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
- func (w *EthClientWrapper) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (w *EthClientWrapper) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (w *EthClientWrapper) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (w *EthClientWrapper) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (w *EthClientWrapper) SuggestGasTipCap(ctx context.Context) (*big.Int, error)
- func (w *EthClientWrapper) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error)
- func (w *EthClientWrapper) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
- func (w *EthClientWrapper) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthClientWrapper ¶
EthClientWrapper wraps *ethclient.Client to implement the ExecutionClient interface
func NewEthClientWrapper ¶
func NewEthClientWrapper(client *ethclient.Client) *EthClientWrapper
NewEthClientWrapper creates a new wrapper around an ethclient.Client
func (*EthClientWrapper) BalanceAt ¶
func (w *EthClientWrapper) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
BalanceAt returns the wei balance of the given account
func (*EthClientWrapper) BlockNumber ¶
func (w *EthClientWrapper) BlockNumber(ctx context.Context) (uint64, error)
BlockNumber returns the most recent block number
func (*EthClientWrapper) CallContract ¶
func (w *EthClientWrapper) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
CallContract executes an Ethereum contract call
func (*EthClientWrapper) CodeAt ¶
func (w *EthClientWrapper) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
CodeAt returns the code of the given account
func (*EthClientWrapper) EstimateGas ¶
func (w *EthClientWrapper) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
EstimateGas tries to estimate the gas needed to execute a specific transaction
func (*EthClientWrapper) FilterLogs ¶
func (w *EthClientWrapper) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
FilterLogs executes a log filter operation
func (*EthClientWrapper) HeaderByHash ¶
func (w *EthClientWrapper) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
HeaderByHash returns the block header with the given hash
func (*EthClientWrapper) HeaderByNumber ¶
func (w *EthClientWrapper) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
HeaderByNumber returns a block header from the current canonical chain
func (*EthClientWrapper) LatestBlockTime ¶
LatestBlockTime returns the timestamp of the latest block
func (*EthClientWrapper) NonceAt ¶
func (w *EthClientWrapper) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
NonceAt returns the account nonce of the given account
func (*EthClientWrapper) PendingCodeAt ¶
func (w *EthClientWrapper) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
PendingCodeAt returns the code of the given account in the pending state
func (*EthClientWrapper) PendingNonceAt ¶
func (w *EthClientWrapper) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
PendingNonceAt retrieves the current pending nonce associated with an account
func (*EthClientWrapper) SendTransaction ¶
func (w *EthClientWrapper) SendTransaction(ctx context.Context, tx *types.Transaction) error
SendTransaction injects the transaction into the pending pool for execution
func (*EthClientWrapper) SubscribeFilterLogs ¶
func (w *EthClientWrapper) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
SubscribeFilterLogs creates a background log filtering operation
func (*EthClientWrapper) SuggestGasPrice ¶
SuggestGasPrice retrieves the currently suggested gas price
func (*EthClientWrapper) SuggestGasTipCap ¶
SuggestGasTipCap retrieves the currently suggested 1559 priority fee
func (*EthClientWrapper) SyncProgress ¶
func (w *EthClientWrapper) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error)
SyncProgress retrieves the current progress of the sync algorithm
func (*EthClientWrapper) TransactionByHash ¶
func (w *EthClientWrapper) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
TransactionByHash returns the transaction with the given hash
func (*EthClientWrapper) TransactionReceipt ¶
func (w *EthClientWrapper) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
TransactionReceipt returns the receipt of a transaction by transaction hash