ethchain

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainErrorWrap

type ChainErrorWrap struct {
	EthClient
}

func (*ChainErrorWrap) BalanceAt

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

func (*ChainErrorWrap) BalanceAtHash

func (c *ChainErrorWrap) BalanceAtHash(ctx context.Context, account common.Address, blockHash common.Hash) (*big.Int, error)

func (*ChainErrorWrap) BlobBaseFee

func (c *ChainErrorWrap) BlobBaseFee(ctx context.Context) (*big.Int, error)

func (*ChainErrorWrap) BlockByHash

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

func (*ChainErrorWrap) BlockByNumber

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

func (*ChainErrorWrap) BlockNumber

func (c *ChainErrorWrap) BlockNumber(ctx context.Context) (uint64, error)

func (*ChainErrorWrap) CallContract

func (c *ChainErrorWrap) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)

func (*ChainErrorWrap) CallContractAtHash

func (c *ChainErrorWrap) CallContractAtHash(ctx context.Context, msg ethereum.CallMsg, blockHash common.Hash) ([]byte, error)

func (*ChainErrorWrap) ChainID

func (c *ChainErrorWrap) ChainID(ctx context.Context) (*big.Int, error)

func (*ChainErrorWrap) Close

func (c *ChainErrorWrap) Close()

func (*ChainErrorWrap) CodeAt

func (c *ChainErrorWrap) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)

func (*ChainErrorWrap) CodeAtHash

func (c *ChainErrorWrap) CodeAtHash(ctx context.Context, account common.Address, blockHash common.Hash) ([]byte, error)

func (*ChainErrorWrap) EstimateGas

func (c *ChainErrorWrap) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)

func (*ChainErrorWrap) EstimateGasAtBlock

func (c *ChainErrorWrap) EstimateGasAtBlock(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) (uint64, error)

func (*ChainErrorWrap) EstimateGasAtBlockHash

func (c *ChainErrorWrap) EstimateGasAtBlockHash(ctx context.Context, msg ethereum.CallMsg, blockHash common.Hash) (uint64, error)

func (*ChainErrorWrap) FeeHistory

func (c *ChainErrorWrap) FeeHistory(ctx context.Context, blockCount uint64, lastBlock *big.Int, rewardPercentiles []float64) (*ethereum.FeeHistory, error)

func (*ChainErrorWrap) FilterLogs

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

func (*ChainErrorWrap) HeaderByHash

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

func (*ChainErrorWrap) HeaderByNumber

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

func (*ChainErrorWrap) NetworkID

func (c *ChainErrorWrap) NetworkID(ctx context.Context) (*big.Int, error)

func (*ChainErrorWrap) NonceAt

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

func (*ChainErrorWrap) NonceAtHash

func (c *ChainErrorWrap) NonceAtHash(ctx context.Context, account common.Address, blockHash common.Hash) (uint64, error)

func (*ChainErrorWrap) PeerCount

func (c *ChainErrorWrap) PeerCount(ctx context.Context) (uint64, error)

func (*ChainErrorWrap) PendingBalanceAt

func (c *ChainErrorWrap) PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error)

func (*ChainErrorWrap) PendingCallContract

func (c *ChainErrorWrap) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error)

func (*ChainErrorWrap) PendingCodeAt

func (c *ChainErrorWrap) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)

func (*ChainErrorWrap) PendingNonceAt

func (c *ChainErrorWrap) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)

func (*ChainErrorWrap) PendingStorageAt

func (c *ChainErrorWrap) PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error)

func (*ChainErrorWrap) PendingTransactionCount

func (c *ChainErrorWrap) PendingTransactionCount(ctx context.Context) (uint, error)

func (*ChainErrorWrap) SendRawTransactionSync

func (c *ChainErrorWrap) SendRawTransactionSync(ctx context.Context, rawTx []byte, timeout *time.Duration) (*types.Receipt, error)

func (*ChainErrorWrap) SendTransaction

func (c *ChainErrorWrap) SendTransaction(ctx context.Context, tx *types.Transaction) error

func (*ChainErrorWrap) SendTransactionSync

func (c *ChainErrorWrap) SendTransactionSync(ctx context.Context, tx *types.Transaction, timeout *time.Duration) (*types.Receipt, error)

func (*ChainErrorWrap) StorageAt

func (c *ChainErrorWrap) StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error)

func (*ChainErrorWrap) StorageAtHash

func (c *ChainErrorWrap) StorageAtHash(ctx context.Context, account common.Address, key common.Hash, blockHash common.Hash) ([]byte, error)

func (*ChainErrorWrap) SubscribeFilterLogs

func (c *ChainErrorWrap) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)

func (*ChainErrorWrap) SubscribeNewHead

func (c *ChainErrorWrap) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)

func (*ChainErrorWrap) SubscribeTransactionReceipts

func (c *ChainErrorWrap) SubscribeTransactionReceipts(ctx context.Context, q *ethereum.TransactionReceiptsQuery, ch chan<- []*types.Receipt) (ethereum.Subscription, error)

func (*ChainErrorWrap) SyncProgress

func (c *ChainErrorWrap) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error)

func (*ChainErrorWrap) TransactionByHash

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

func (*ChainErrorWrap) TransactionCount

func (c *ChainErrorWrap) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error)

func (*ChainErrorWrap) TransactionInBlock

func (c *ChainErrorWrap) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error)

func (*ChainErrorWrap) TransactionReceipt

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

func (*ChainErrorWrap) TransactionSender

func (c *ChainErrorWrap) TransactionSender(ctx context.Context, tx *types.Transaction, block common.Hash, index uint) (common.Address, error)

type EthClient

type EthClient interface {
	BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
	BalanceAtHash(ctx context.Context, account common.Address, blockHash common.Hash) (*big.Int, error)
	BlobBaseFee(ctx context.Context) (*big.Int, error)
	BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
	BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
	BlockNumber(ctx context.Context) (uint64, error)
	//BlockReceipts(ctx context.Context, blockNrOrHash erpc.BlockNumberOrHash) ([]*types.Receipt, error)
	CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
	CallContractAtHash(ctx context.Context, msg ethereum.CallMsg, blockHash common.Hash) ([]byte, error)
	ChainID(ctx context.Context) (*big.Int, error)
	//Client() *erpc.Client
	Close()
	CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
	CodeAtHash(ctx context.Context, account common.Address, blockHash common.Hash) ([]byte, error)
	EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)
	EstimateGasAtBlock(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) (uint64, error)
	EstimateGasAtBlockHash(ctx context.Context, msg ethereum.CallMsg, blockHash common.Hash) (uint64, error)
	FeeHistory(ctx context.Context, blockCount uint64, lastBlock *big.Int, rewardPercentiles []float64) (*ethereum.FeeHistory, error)
	FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
	HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
	HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
	NetworkID(ctx context.Context) (*big.Int, error)
	NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
	NonceAtHash(ctx context.Context, account common.Address, blockHash common.Hash) (uint64, error)
	PeerCount(ctx context.Context) (uint64, error)
	PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error)
	PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error)
	PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
	PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
	PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error)
	PendingTransactionCount(ctx context.Context) (uint, error)
	SendRawTransactionSync(ctx context.Context, rawTx []byte, timeout *time.Duration) (*types.Receipt, error)
	SendTransaction(ctx context.Context, tx *types.Transaction) error
	SendTransactionSync(ctx context.Context, tx *types.Transaction, timeout *time.Duration) (*types.Receipt, error)
	//SimulateV1(ctx context.Context, opts ethclient.SimulateOptions, blockNrOrHash *erpc.BlockNumberOrHash) ([]ethclient.SimulateBlockResult, error)
	StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error)
	StorageAtHash(ctx context.Context, account common.Address, key common.Hash, blockHash common.Hash) ([]byte, error)
	SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
	SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)
	SubscribeTransactionReceipts(ctx context.Context, q *ethereum.TransactionReceiptsQuery, ch chan<- []*types.Receipt) (ethereum.Subscription, error)
	SuggestGasPrice(ctx context.Context) (*big.Int, error)
	SuggestGasTipCap(ctx context.Context) (*big.Int, error)
	SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error)
	TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
	TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error)
	TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error)
	TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
	TransactionSender(ctx context.Context, tx *types.Transaction, block common.Hash, index uint) (common.Address, error)
}

Jump to

Keyboard shortcuts

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