Documentation
¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)
- func (c *Client) EthClient() *ethclient.Client
- func (c *Client) GetBalance(ctx context.Context, address common.Address) (*big.Int, error)
- func (c *Client) GetBlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (c *Client) GetBlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
- func (c *Client) GetChainID(ctx context.Context) (*big.Int, error)
- func (c *Client) GetConfirmedNonce(ctx context.Context, address common.Address) (uint64, error)
- func (c *Client) GetLatestBlock(ctx context.Context) (*types.Block, error)
- func (c *Client) GetNonce(ctx context.Context, address common.Address) (uint64, error)
- func (c *Client) GetStorageAt(ctx context.Context, account common.Address, slot common.Hash) ([]byte, error)
- func (c *Client) GetTransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- func (c *Client) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (c *Client) IsTxKnown(ctx context.Context, txHash common.Hash) (bool, error)
- func (c *Client) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (c *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (c *Client) SuggestGasTipCap(ctx context.Context) (*big.Int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles standard JSON-RPC calls for wallet/transaction operations. Only needed when lifecycle management is enabled.
func (*Client) EstimateGas ¶
EstimateGas estimates gas for a transaction.
func (*Client) GetBalance ¶
GetBalance returns the balance for an address.
func (*Client) GetBlockByHash ¶
GetBlockByHash returns a block by hash.
func (*Client) GetBlockByNumber ¶
GetBlockByNumber returns a block by number.
func (*Client) GetChainID ¶
GetChainID returns the chain ID.
func (*Client) GetConfirmedNonce ¶
GetConfirmedNonce returns the account nonce at the latest block (state at head, excluding the mempool). It is reliable even on clients whose "pending" nonce is buggy: ethrex has been observed returning a pending nonce *below* the latest one, which would otherwise cause us to build an already-used ("too low") nonce.
func (*Client) GetLatestBlock ¶
GetLatestBlock returns the latest block.
func (*Client) GetStorageAt ¶
func (c *Client) GetStorageAt( ctx context.Context, account common.Address, slot common.Hash, ) ([]byte, error)
GetStorageAt returns the raw 32-byte value stored at slot for the given account at the latest block. Used to read the EIP-7002/7251/8282 system-contract queue excess (slot 0) for queue-fee calculation.
func (*Client) GetTransactionReceipt ¶
func (c *Client) GetTransactionReceipt( ctx context.Context, txHash common.Hash, ) (*types.Receipt, error)
GetTransactionReceipt returns the receipt for a transaction.
func (*Client) HeaderByNumber ¶
HeaderByNumber returns the header for a block number.
func (*Client) IsTxKnown ¶
IsTxKnown reports whether the node currently knows the transaction (pending in the mempool or already mined). Returns false (without error) when the tx is unknown. This lets callers reason about transaction acceptance from node state rather than by parsing client-specific send error strings.
func (*Client) SendTransaction ¶
SendTransaction sends a signed transaction.
func (*Client) SuggestGasPrice ¶
SuggestGasPrice returns the suggested gas price.