Documentation ¶
Overview ¶
Package ethclient provides a client for the Ethereum RPC API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToBlockNumArg ¶
Types ¶
type Client ¶
type Client interface { Client() *rpc.Client Close() ChainConfig(context.Context) (*params.ChainConfigWithUpgradesJSON, error) ChainID(context.Context) (*big.Int, error) BlockByHash(context.Context, common.Hash) (*types.Block, error) BlockByNumber(context.Context, *big.Int) (*types.Block, error) BlockNumber(context.Context) (uint64, error) BlockReceipts(context.Context, rpc.BlockNumberOrHash) ([]*types.Receipt, error) HeaderByHash(context.Context, common.Hash) (*types.Header, error) HeaderByNumber(context.Context, *big.Int) (*types.Header, error) TransactionByHash(context.Context, common.Hash) (tx *types.Transaction, isPending bool, err error) TransactionSender(context.Context, *types.Transaction, common.Hash, uint) (common.Address, error) TransactionCount(context.Context, common.Hash) (uint, error) TransactionInBlock(context.Context, common.Hash, uint) (*types.Transaction, error) TransactionReceipt(context.Context, common.Hash) (*types.Receipt, error) SyncProgress(ctx context.Context) error SubscribeNewAcceptedTransactions(context.Context, chan<- *common.Hash) (interfaces.Subscription, error) SubscribeNewPendingTransactions(context.Context, chan<- *common.Hash) (interfaces.Subscription, error) SubscribeNewHead(context.Context, chan<- *types.Header) (interfaces.Subscription, error) NetworkID(context.Context) (*big.Int, error) BalanceAt(context.Context, common.Address, *big.Int) (*big.Int, error) AssetBalanceAt(context.Context, common.Address, ids.ID, *big.Int) (*big.Int, error) BalanceAtHash(ctx context.Context, account common.Address, blockHash common.Hash) (*big.Int, error) StorageAt(context.Context, common.Address, common.Hash, *big.Int) ([]byte, error) StorageAtHash(ctx context.Context, account common.Address, key common.Hash, blockHash common.Hash) ([]byte, error) CodeAt(context.Context, common.Address, *big.Int) ([]byte, error) CodeAtHash(ctx context.Context, account common.Address, blockHash common.Hash) ([]byte, error) NonceAt(context.Context, common.Address, *big.Int) (uint64, error) NonceAtHash(ctx context.Context, account common.Address, blockHash common.Hash) (uint64, error) FilterLogs(context.Context, interfaces.FilterQuery) ([]types.Log, error) SubscribeFilterLogs(context.Context, interfaces.FilterQuery, chan<- types.Log) (interfaces.Subscription, error) AcceptedCodeAt(context.Context, common.Address) ([]byte, error) AcceptedNonceAt(context.Context, common.Address) (uint64, error) AcceptedCallContract(context.Context, interfaces.CallMsg) ([]byte, error) CallContract(context.Context, interfaces.CallMsg, *big.Int) ([]byte, error) CallContractAtHash(ctx context.Context, msg interfaces.CallMsg, blockHash common.Hash) ([]byte, error) SuggestGasPrice(context.Context) (*big.Int, error) SuggestGasTipCap(context.Context) (*big.Int, error) FeeHistory(ctx context.Context, blockCount uint64, lastBlock *big.Int, rewardPercentiles []float64) (*interfaces.FeeHistory, error) EstimateGas(context.Context, interfaces.CallMsg) (uint64, error) EstimateBaseFee(context.Context) (*big.Int, error) SendTransaction(context.Context, *types.Transaction) error }
Client defines interface for typed wrappers for the Ethereum RPC API.
func DialContext ¶
DialContext connects a client to the given URL with context.
Directories ¶
Path | Synopsis |
---|---|
Package subnetevmclient provides an RPC client for subnet-evm-specific APIs.
|
Package subnetevmclient provides an RPC client for subnet-evm-specific APIs. |
Click to show internal directories.
Click to hide internal directories.