chain

package
v0.114.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ChainID uint64
	// contains filtered or unexported fields
}

func NewClient

func NewClient(rpc *rpc.Client, chainID uint64) (*Client, error)

func NewClients

func NewClients(rpc *rpc.Client, chainIDs []uint64) (res []*Client, err error)

func NewLegacyClient

func NewLegacyClient(rpc *rpc.Client) (*Client, error)

func (*Client) BalanceAt

func (cc *Client) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)

func (*Client) BlockByHash

func (cc *Client) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)

func (*Client) BlockByNumber

func (cc *Client) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)

func (*Client) CallContract

func (cc *Client) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)

func (*Client) CodeAt

func (cc *Client) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)

func (*Client) FilterLogs

func (cc *Client) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)

func (*Client) GetBaseFeeFromBlock added in v0.109.1

func (cc *Client) GetBaseFeeFromBlock(blockNumber *big.Int) (string, error)

func (*Client) HeaderByHash

func (cc *Client) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)

func (*Client) HeaderByNumber

func (cc *Client) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

func (*Client) NonceAt

func (cc *Client) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)

func (*Client) ToBigInt

func (cc *Client) ToBigInt() *big.Int

func (*Client) TransactionByHash

func (cc *Client) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)

func (*Client) TransactionReceipt

func (cc *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)

type FeeHistory added in v0.109.1

type FeeHistory struct {
	BaseFeePerGas []string `json:"baseFeePerGas"`
}

Jump to

Keyboard shortcuts

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