Documentation
¶
Index ¶
- type AccessListBuilder
- type Client
- func (c *Client) CreateAccessList(ctx context.Context, tx map[string]any) (ethTypes.AccessList, error)
- func (c *Client) EstimateGas(ctx context.Context, call map[string]any) (uint64, error)
- func (c *Client) GetBalance(ctx context.Context, address common.Address, blockTag types.BlockTag) (*big.Int, error)
- func (c *Client) GetBlockByHash(ctx context.Context, blockHash common.Hash, fullTx bool) (json.RawMessage, error)
- func (c *Client) GetBlockByNumber(ctx context.Context, blockNumber *big.Int, fullTx bool) (json.RawMessage, error)
- func (c *Client) GetBlockNumber(ctx context.Context) (*big.Int, error)
- func (c *Client) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (uint64, error)
- func (c *Client) GetBlockTransactionCountByNumber(ctx context.Context, blockNumber *big.Int) (uint64, error)
- func (c *Client) GetChainID(ctx context.Context) (*big.Int, error)
- func (c *Client) GetTransactionCount(ctx context.Context, address common.Address, blockTag types.BlockTag) (uint64, error)
- func (c *Client) SimulateBlocks(ctx context.Context, blockCount int) (json.RawMessage, error)
- func (c *Client) SimulateCall(ctx context.Context, call map[string]any, blockTag types.BlockTag) (string, error)
- func (c *Client) WatchBlockNumber(ctx context.Context) (json.RawMessage, error)
- func (c *Client) WatchBlocks(ctx context.Context, blockCount int) (json.RawMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessListBuilder ¶
type AccessListBuilder struct {
// contains filtered or unexported fields
}
func NewAccessListBuilder ¶
func NewAccessListBuilder() *AccessListBuilder
func (*AccessListBuilder) Add ¶
func (b *AccessListBuilder) Add(address common.Address, storageKey common.Hash)
func (*AccessListBuilder) AddAddressOnly ¶
func (b *AccessListBuilder) AddAddressOnly(address common.Address)
func (*AccessListBuilder) Build ¶
func (b *AccessListBuilder) Build() types.AccessList
type Client ¶
Client is a Client for public Ethereum RPC methods
func (*Client) CreateAccessList ¶
func (c *Client) CreateAccessList(ctx context.Context, tx map[string]any) (ethTypes.AccessList, error)
CreateAccessList creates an access list for the specified address method: eth_createAccessList
func (*Client) EstimateGas ¶
EstimateGas estimates the gas method: eth_estimateGas
func (*Client) GetBalance ¶
func (c *Client) GetBalance(ctx context.Context, address common.Address, blockTag types.BlockTag) (*big.Int, error)
GetBalance gets the balance of the specified address at a certain block, default blockTag is "latest" method: eth_getBalance
func (*Client) GetBlockByHash ¶
func (c *Client) GetBlockByHash(ctx context.Context, blockHash common.Hash, fullTx bool) (json.RawMessage, error)
GetBlockByHash get block information by block hash method: eth_getBlockByHash
func (*Client) GetBlockByNumber ¶
func (c *Client) GetBlockByNumber(ctx context.Context, blockNumber *big.Int, fullTx bool) (json.RawMessage, error)
GetBlockByNumber get block information by block number method: eth_getBlockByNumber
func (*Client) GetBlockNumber ¶
GetBlockNumber get the latest block number method: eth_blockNumber
func (*Client) GetBlockTransactionCountByHash ¶
func (c *Client) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (uint64, error)
GetBlockTransactionCountByHash get transaction count by block hash method: eth_getBlockTransactionCountByHash
func (*Client) GetBlockTransactionCountByNumber ¶
func (c *Client) GetBlockTransactionCountByNumber(ctx context.Context, blockNumber *big.Int) (uint64, error)
GetBlockTransactionCountByNumber get transaction count by block number method: eth_getBlockTransactionCountByNumber
func (*Client) GetChainID ¶
GetChainID gets the chain ID method: eth_getChainId
func (*Client) GetTransactionCount ¶
func (c *Client) GetTransactionCount(ctx context.Context, address common.Address, blockTag types.BlockTag) (uint64, error)
GetTransactionCount gets the transaction count of the specified address method: eth_getTransactionCount
func (*Client) SimulateBlocks ¶
SimulateBlocks simulate blocks method: eth_simulateBlocks
func (*Client) SimulateCall ¶
func (c *Client) SimulateCall(ctx context.Context, call map[string]any, blockTag types.BlockTag) (string, error)
SimulateCall simulates an eth_call method: eth_simulateCall
func (*Client) WatchBlockNumber ¶
WatchBlockNumber watch block number method: eth_watchBlockNumber
func (*Client) WatchBlocks ¶
WatchBlocks watch blocks method: eth_watchBlocks