ethclient

package module
v1.13.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 8 Imported by: 0

README

ethclient

go ethereum client wrapper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Big2Int64

func Big2Int64(n *big.Int) int64

func Hex2Address

func Hex2Address(addr string) common.Address

func Hex2Hash

func Hex2Hash(hash string) common.Hash

func Int642Big

func Int642Big(n int64) *big.Int

func Uint642Big

func Uint642Big(n uint64) *big.Int

Types

type EthereumClient

type EthereumClient struct {
	// contains filtered or unexported fields
}

func NewEthereumClient

func NewEthereumClient(strNodeUrl string) *EthereumClient

func (*EthereumClient) BalanceAt

func (m *EthereumClient) BalanceAt(ctx context.Context, strAddress string, number uint64) (*big.Int, error)

func (*EthereumClient) BalanceAtHash

func (m *EthereumClient) BalanceAtHash(ctx context.Context, strAddress string, strBlockHash string) (*big.Int, error)

func (*EthereumClient) BlockByHash

func (m *EthereumClient) BlockByHash(ctx context.Context, hash string) (*types.Block, error)

func (*EthereumClient) BlockByNumber

func (m *EthereumClient) BlockByNumber(ctx context.Context, number uint64) (*types.Block, error)

func (*EthereumClient) BlockNumber

func (m *EthereumClient) BlockNumber(ctx context.Context) (uint64, error)

func (*EthereumClient) BlockReceipts

func (m *EthereumClient) BlockReceipts(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) ([]*types.Receipt, error)

func (*EthereumClient) CallContract

func (m *EthereumClient) CallContract(ctx context.Context, msg ethereum.CallMsg, number uint64) ([]byte, error)

func (*EthereumClient) CallContractAtHash

func (m *EthereumClient) CallContractAtHash(ctx context.Context, msg ethereum.CallMsg, strBlockHash string) ([]byte, error)

func (*EthereumClient) ChainID

func (m *EthereumClient) ChainID(ctx context.Context) (chainId int64, err error)

func (*EthereumClient) CodeAt

func (m *EthereumClient) CodeAt(ctx context.Context, strAddress string, number uint64) ([]byte, error)

func (*EthereumClient) CodeAtHash

func (m *EthereumClient) CodeAtHash(ctx context.Context, strAddress, strBlockHash string) ([]byte, error)

func (*EthereumClient) EstimateGas

func (m *EthereumClient) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)

func (*EthereumClient) FeeHistory

func (m *EthereumClient) FeeHistory(ctx context.Context, blockCount uint64, blockNumber uint64, rewardPercentiles []float64) (*ethereum.FeeHistory, error)

func (*EthereumClient) FilterLogs

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

func (*EthereumClient) HeaderByHash

func (m *EthereumClient) HeaderByHash(ctx context.Context, hash string) (*types.Header, error)

func (*EthereumClient) HeaderByNumber

func (m *EthereumClient) HeaderByNumber(ctx context.Context, number uint64) (*types.Header, error)

func (*EthereumClient) NetworkID

func (m *EthereumClient) NetworkID(ctx context.Context) (int64, error)

func (*EthereumClient) NonceAt

func (m *EthereumClient) NonceAt(ctx context.Context, strAddress string, number uint64) (uint64, error)

func (*EthereumClient) NonceAtHash

func (m *EthereumClient) NonceAtHash(ctx context.Context, strAddress string, strBlockHash string) (uint64, error)

func (*EthereumClient) PeerCount

func (m *EthereumClient) PeerCount(ctx context.Context) (uint64, error)

func (*EthereumClient) PendingBalanceAt

func (m *EthereumClient) PendingBalanceAt(ctx context.Context, strAddress string) (*big.Int, error)

func (*EthereumClient) PendingCallContract

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

func (*EthereumClient) PendingCodeAt

func (m *EthereumClient) PendingCodeAt(ctx context.Context, strAddress string) ([]byte, error)

func (*EthereumClient) PendingNonceAt

func (m *EthereumClient) PendingNonceAt(ctx context.Context, strAddress string) (uint64, error)

func (*EthereumClient) PendingStorageAt

func (m *EthereumClient) PendingStorageAt(ctx context.Context, strAddress string, strKey string) ([]byte, error)

func (*EthereumClient) PendingTransactionCount

func (m *EthereumClient) PendingTransactionCount(ctx context.Context) (uint, error)

func (*EthereumClient) SendTransaction

func (m *EthereumClient) SendTransaction(ctx context.Context, tx *types.Transaction) error

func (*EthereumClient) StorageAt

func (m *EthereumClient) StorageAt(ctx context.Context, strAddress, strKey string, number uint64) ([]byte, error)

func (*EthereumClient) StorageAtHash

func (m *EthereumClient) StorageAtHash(ctx context.Context, strAddress, strKey, strBlockHash string) ([]byte, error)

func (*EthereumClient) SubscribeFilterLogs

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

func (*EthereumClient) SubscribeNewHead

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

func (*EthereumClient) SuggestGasPrice

func (m *EthereumClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)

func (*EthereumClient) SuggestGasTipCap

func (m *EthereumClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error)

func (*EthereumClient) SyncProgress

func (m *EthereumClient) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error)

func (*EthereumClient) TransactionByHash

func (m *EthereumClient) TransactionByHash(ctx context.Context, hash string) (tx *types.Transaction, pending bool, err error)

func (*EthereumClient) TransactionCount

func (m *EthereumClient) TransactionCount(ctx context.Context, strBlockHash string) (uint, error)

func (*EthereumClient) TransactionInBlock

func (m *EthereumClient) TransactionInBlock(ctx context.Context, strBlockHash string, index uint) (*types.Transaction, error)

func (*EthereumClient) TransactionReceipt

func (m *EthereumClient) TransactionReceipt(ctx context.Context, hash string) (tx *types.Receipt, err error)

func (*EthereumClient) TransactionSender

func (m *EthereumClient) TransactionSender(ctx context.Context, tx *types.Transaction, strBlockHash string, index uint) (common.Address, error)

Jump to

Keyboard shortcuts

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