eth

package
v0.0.0-...-57b907f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

type Client struct {
	Client client.Transport
}

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

func (c *Client) EstimateGas(ctx context.Context, call map[string]any) (uint64, error)

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

func (c *Client) GetBlockNumber(ctx context.Context) (*big.Int, error)

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

func (c *Client) GetChainID(ctx context.Context) (*big.Int, error)

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

func (c *Client) SimulateBlocks(ctx context.Context, blockCount int) (json.RawMessage, error)

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

func (c *Client) WatchBlockNumber(ctx context.Context) (json.RawMessage, error)

WatchBlockNumber watch block number method: eth_watchBlockNumber

func (*Client) WatchBlocks

func (c *Client) WatchBlocks(ctx context.Context, blockCount int) (json.RawMessage, error)

WatchBlocks watch blocks method: eth_watchBlocks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL