Documentation
¶
Overview ¶
Package eth implements RPC API bindings for methods in the "eth" namespace.
Index ¶
- func AccessList(msg *w3types.Message, blockNumber *big.Int) w3types.CallerFactory[AccessListResponse]
- func Balance(addr common.Address, blockNumber *big.Int) w3types.CallerFactory[big.Int]
- func BlockByHash(hash common.Hash) w3types.CallerFactory[types.Block]
- func BlockByNumber(number *big.Int) w3types.CallerFactory[types.Block]
- func BlockNumber() w3types.CallerFactory[big.Int]
- func BlockTxCountByHash(hash common.Hash) w3types.CallerFactory[uint]
- func BlockTxCountByNumber(number *big.Int) w3types.CallerFactory[uint]
- func Call(msg *w3types.Message, blockNumber *big.Int, overrides w3types.State) w3types.CallerFactory[[]byte]
- func ChainID() w3types.CallerFactory[uint64]
- func Code(addr common.Address, blockNumber *big.Int) w3types.CallerFactory[[]byte]
- func EstimateGas(msg *w3types.Message, blockNumber *big.Int) w3types.CallerFactory[uint64]
- func GasPrice() w3types.CallerFactory[big.Int]
- func HeaderByHash(hash common.Hash) w3types.CallerFactory[types.Header]
- func HeaderByNumber(number *big.Int) w3types.CallerFactory[types.Header]
- func Logs(q ethereum.FilterQuery) w3types.CallerFactory[[]types.Log]
- func Nonce(addr common.Address, blockNumber *big.Int) w3types.CallerFactory[uint64]
- func SendRawTransaction(rawTx []byte) w3types.CallerFactory[common.Hash]deprecated
- func SendRawTx(rawTx []byte) w3types.CallerFactory[common.Hash]
- func SendTransaction(tx *types.Transaction) w3types.CallerFactory[common.Hash]deprecated
- func SendTx(tx *types.Transaction) w3types.CallerFactory[common.Hash]
- func StorageAt(addr common.Address, slot common.Hash, blockNumber *big.Int) w3types.CallerFactory[common.Hash]
- func TransactionByHash(hash common.Hash) w3types.CallerFactory[types.Transaction]deprecated
- func TransactionReceipt(hash common.Hash) w3types.CallerFactory[types.Receipt]deprecated
- func Tx(hash common.Hash) w3types.CallerFactory[types.Transaction]
- func TxByBlockHashAndIndex(blockHash common.Hash, index uint64) w3types.CallerFactory[types.Transaction]
- func TxByBlockNumberAndIndex(blockNumber *big.Int, index uint64) w3types.CallerFactory[types.Transaction]
- func TxReceipt(txHash common.Hash) w3types.CallerFactory[types.Receipt]
- func UncleByBlockHashAndIndex(hash common.Hash, index uint) w3types.CallerFactory[types.Header]
- func UncleByBlockNumberAndIndex(number *big.Int, index uint) w3types.CallerFactory[types.Header]
- func UncleCountByBlockHash(hash common.Hash) w3types.CallerFactory[uint]
- func UncleCountByBlockNumber(number *big.Int) w3types.CallerFactory[uint]
- type AccessListResponse
- type CallFuncFactory
- func (f *CallFuncFactory) AtBlock(blockNumber *big.Int) *CallFuncFactory
- func (f *CallFuncFactory) CreateRequest() (rpc.BatchElem, error)
- func (f *CallFuncFactory) HandleResponse(elem rpc.BatchElem) error
- func (f *CallFuncFactory) Overrides(overrides w3types.State) *CallFuncFactory
- func (f *CallFuncFactory) Returns(returns ...any) w3types.Caller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessList ¶ added in v0.9.0
func AccessList(msg *w3types.Message, blockNumber *big.Int) w3types.CallerFactory[AccessListResponse]
AccessList requests the access list of the given message at the given blockNumber. If blockNumber is nil, the access list of the message at the latest block is requested.
func Balance ¶
Balance requests the balance of the given common.Address addr at the given blockNumber. If blockNumber is nil, the balance at the latest known block is requested.
func BlockByHash ¶ added in v0.2.0
BlockByHash requests the block with the given hash with full transactions.
func BlockByNumber ¶ added in v0.2.0
BlockByNumber requests the block with the given number with full transactions. If number is nil, the latest block is requested.
func BlockNumber ¶
func BlockNumber() w3types.CallerFactory[big.Int]
BlockNumber requests the number of the most recent block.
func BlockTxCountByHash ¶ added in v0.9.0
func BlockTxCountByHash(hash common.Hash) w3types.CallerFactory[uint]
BlockTxCountByHash requests the number of transactions in the block with the given hash.
func BlockTxCountByNumber ¶ added in v0.9.0
func BlockTxCountByNumber(number *big.Int) w3types.CallerFactory[uint]
BlockTxCountByNumber requests the number of transactions in the block with the given number.
func Call ¶
func Call(msg *w3types.Message, blockNumber *big.Int, overrides w3types.State) w3types.CallerFactory[[]byte]
Call requests the output data of the given message at the given blockNumber. If blockNumber is nil, the output of the message at the latest known block is requested.
func Code ¶
Code requests the code of the given common.Address addr at the given blockNumber. If blockNumber is nil, the code at the latest known block is requested.
func EstimateGas ¶ added in v0.9.0
EstimateGas requests the estimated gas cost of the given message at the given blockNumber. If blockNumber is nil, the estimated gas cost of the message at the latest block is requested.
func GasPrice ¶
func GasPrice() w3types.CallerFactory[big.Int]
GasPrice requests the current gas price in wei.
func HeaderByHash ¶ added in v0.2.0
HeaderByHash requests the header with the given hash.
func HeaderByNumber ¶ added in v0.2.0
HeaderByNumber requests the header with the given number. If number is nil, the latest header is requested.
func Logs ¶ added in v0.2.0
func Logs(q ethereum.FilterQuery) w3types.CallerFactory[[]types.Log]
Logs requests the logs of the given ethereum.FilterQuery q.
func Nonce ¶
Nonce requests the nonce of the given common.Address addr at the given blockNumber. If blockNumber is nil, the nonce at the latest known block is requested.
func SendRawTransaction
deprecated
added in
v0.2.0
func SendRawTx ¶ added in v0.9.0
func SendRawTx(rawTx []byte) w3types.CallerFactory[common.Hash]
SendRawTx sends a raw transaction to the network and returns its hash.
func SendTransaction
deprecated
added in
v0.2.0
func SendTransaction(tx *types.Transaction) w3types.CallerFactory[common.Hash]
Deprecated: SendTransaction sends a signed transaction to the network.
Use SendTx instead.
func SendTx ¶ added in v0.9.0
func SendTx(tx *types.Transaction) w3types.CallerFactory[common.Hash]
SendTx sends a signed transaction to the network and returns its hash.
func StorageAt ¶
func StorageAt(addr common.Address, slot common.Hash, blockNumber *big.Int) w3types.CallerFactory[common.Hash]
StorageAt requests the storage of the given common.Address addr at the given common.Hash slot at the given blockNumber. If block number is nil, the slot at the latest known block is requested.
func TransactionByHash
deprecated
added in
v0.2.0
func TransactionByHash(hash common.Hash) w3types.CallerFactory[types.Transaction]
Deprecated: TransactionByHash requests the transaction with the given hash.
Use Tx instead.
func TransactionReceipt
deprecated
added in
v0.2.0
func Tx ¶ added in v0.9.0
func Tx(hash common.Hash) w3types.CallerFactory[types.Transaction]
Tx requests the transaction with the given hash.
func TxByBlockHashAndIndex ¶ added in v0.9.0
func TxByBlockHashAndIndex(blockHash common.Hash, index uint64) w3types.CallerFactory[types.Transaction]
TxByBlockHashAndIndex requests the transaction in the given block with the given index.
func TxByBlockNumberAndIndex ¶ added in v0.9.0
func TxByBlockNumberAndIndex(blockNumber *big.Int, index uint64) w3types.CallerFactory[types.Transaction]
TxByBlockNumberAndIndex requests the transaction in the given block with the given index.
func TxReceipt ¶ added in v0.9.0
TxReceipt requests the receipt of the transaction with the given hash.
func UncleByBlockHashAndIndex ¶ added in v0.9.0
UncleByBlockHashAndIndex requests the uncle of the block with the given hash at the given index.
func UncleByBlockNumberAndIndex ¶ added in v0.9.0
UncleByBlockNumberAndIndex requests the uncle of the block with the given number at the given index.
func UncleCountByBlockHash ¶ added in v0.9.0
func UncleCountByBlockHash(hash common.Hash) w3types.CallerFactory[uint]
UncleCountByBlockHash requests the number of uncles of the block with the given hash.
func UncleCountByBlockNumber ¶ added in v0.9.0
func UncleCountByBlockNumber(number *big.Int) w3types.CallerFactory[uint]
UncleCountByBlockNumber requests the number of uncles of the block with the given number.
Types ¶
type AccessListResponse ¶ added in v0.9.0
type AccessListResponse struct { AccessList types.AccessList GasUsed uint64 }
func (*AccessListResponse) UnmarshalJSON ¶ added in v0.9.0
func (alResp *AccessListResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.
type CallFuncFactory ¶
type CallFuncFactory struct {
// contains filtered or unexported fields
}
func CallFunc ¶
CallFunc requests the returns of Func fn at common.Address contract with the given args.
func (*CallFuncFactory) AtBlock ¶
func (f *CallFuncFactory) AtBlock(blockNumber *big.Int) *CallFuncFactory
func (*CallFuncFactory) CreateRequest ¶
func (f *CallFuncFactory) CreateRequest() (rpc.BatchElem, error)
func (*CallFuncFactory) HandleResponse ¶
func (f *CallFuncFactory) HandleResponse(elem rpc.BatchElem) error
func (*CallFuncFactory) Overrides ¶ added in v0.6.0
func (f *CallFuncFactory) Overrides(overrides w3types.State) *CallFuncFactory