ethclient

package
v0.0.0-...-d2182b9 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package ethclient is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Close()
	ChainID(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)
	PeerCount(ctx context.Context) (uint64, error)
	HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
	HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
	TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
	TransactionSender(ctx context.Context, tx *types.Transaction, block common.Hash, index uint) (common.Address, 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)
	SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error)
	SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)
	NetworkID(ctx context.Context) (*big.Int, error)
	BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
	StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error)
	CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
	NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
	FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
	SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
	PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error)
	PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error)
	PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
	PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
	PendingTransactionCount(ctx context.Context) (uint, 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)
	PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error)
	SuggestGasPrice(ctx context.Context) (*big.Int, error)
	SuggestGasTipCap(ctx context.Context) (*big.Int, error)
	FeeHistory(ctx context.Context, blockCount uint64, lastBlock *big.Int, rewardPercentiles []float64) (*ethereum.FeeHistory, error)
	EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)
	SendTransaction(ctx context.Context, tx *types.Transaction) error
}

func NewClient

func NewClient(url string) (Client, error)

type MockClient

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

MockClient is a mock of Client interface.

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) BalanceAt

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

BalanceAt mocks base method.

func (*MockClient) BlockByHash

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

BlockByHash mocks base method.

func (*MockClient) BlockByNumber

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

BlockByNumber mocks base method.

func (*MockClient) BlockNumber

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

BlockNumber mocks base method.

func (*MockClient) CallContract

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

CallContract mocks base method.

func (*MockClient) CallContractAtHash

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

CallContractAtHash mocks base method.

func (*MockClient) ChainID

func (m *MockClient) ChainID(ctx context.Context) (*big.Int, error)

ChainID mocks base method.

func (*MockClient) Close

func (m *MockClient) Close()

Close mocks base method.

func (*MockClient) CodeAt

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

CodeAt mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) EstimateGas

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

EstimateGas mocks base method.

func (*MockClient) FeeHistory

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

FeeHistory mocks base method.

func (*MockClient) FilterLogs

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

FilterLogs mocks base method.

func (*MockClient) HeaderByHash

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

HeaderByHash mocks base method.

func (*MockClient) HeaderByNumber

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

HeaderByNumber mocks base method.

func (*MockClient) NetworkID

func (m *MockClient) NetworkID(ctx context.Context) (*big.Int, error)

NetworkID mocks base method.

func (*MockClient) NonceAt

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

NonceAt mocks base method.

func (*MockClient) PeerCount

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

PeerCount mocks base method.

func (*MockClient) PendingBalanceAt

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

PendingBalanceAt mocks base method.

func (*MockClient) PendingCallContract

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

PendingCallContract mocks base method.

func (*MockClient) PendingCodeAt

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

PendingCodeAt mocks base method.

func (*MockClient) PendingNonceAt

func (m *MockClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)

PendingNonceAt mocks base method.

func (*MockClient) PendingStorageAt

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

PendingStorageAt mocks base method.

func (*MockClient) PendingTransactionCount

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

PendingTransactionCount mocks base method.

func (*MockClient) SendTransaction

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

SendTransaction mocks base method.

func (*MockClient) StorageAt

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

StorageAt mocks base method.

func (*MockClient) SubscribeFilterLogs

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

SubscribeFilterLogs mocks base method.

func (*MockClient) SubscribeNewHead

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

SubscribeNewHead mocks base method.

func (*MockClient) SuggestGasPrice

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

SuggestGasPrice mocks base method.

func (*MockClient) SuggestGasTipCap

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

SuggestGasTipCap mocks base method.

func (*MockClient) SyncProgress

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

SyncProgress mocks base method.

func (*MockClient) TransactionByHash

func (m *MockClient) TransactionByHash(ctx context.Context, hash common.Hash) (*types.Transaction, bool, error)

TransactionByHash mocks base method.

func (*MockClient) TransactionCount

func (m *MockClient) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error)

TransactionCount mocks base method.

func (*MockClient) TransactionInBlock

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

TransactionInBlock mocks base method.

func (*MockClient) TransactionReceipt

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

TransactionReceipt mocks base method.

func (*MockClient) TransactionSender

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

TransactionSender mocks base method.

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) BalanceAt

func (mr *MockClientMockRecorder) BalanceAt(ctx, account, blockNumber interface{}) *gomock.Call

BalanceAt indicates an expected call of BalanceAt.

func (*MockClientMockRecorder) BlockByHash

func (mr *MockClientMockRecorder) BlockByHash(ctx, hash interface{}) *gomock.Call

BlockByHash indicates an expected call of BlockByHash.

func (*MockClientMockRecorder) BlockByNumber

func (mr *MockClientMockRecorder) BlockByNumber(ctx, number interface{}) *gomock.Call

BlockByNumber indicates an expected call of BlockByNumber.

func (*MockClientMockRecorder) BlockNumber

func (mr *MockClientMockRecorder) BlockNumber(ctx interface{}) *gomock.Call

BlockNumber indicates an expected call of BlockNumber.

func (*MockClientMockRecorder) CallContract

func (mr *MockClientMockRecorder) CallContract(ctx, msg, blockNumber interface{}) *gomock.Call

CallContract indicates an expected call of CallContract.

func (*MockClientMockRecorder) CallContractAtHash

func (mr *MockClientMockRecorder) CallContractAtHash(ctx, msg, blockHash interface{}) *gomock.Call

CallContractAtHash indicates an expected call of CallContractAtHash.

func (*MockClientMockRecorder) ChainID

func (mr *MockClientMockRecorder) ChainID(ctx interface{}) *gomock.Call

ChainID indicates an expected call of ChainID.

func (*MockClientMockRecorder) Close

func (mr *MockClientMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockClientMockRecorder) CodeAt

func (mr *MockClientMockRecorder) CodeAt(ctx, account, blockNumber interface{}) *gomock.Call

CodeAt indicates an expected call of CodeAt.

func (*MockClientMockRecorder) EstimateGas

func (mr *MockClientMockRecorder) EstimateGas(ctx, msg interface{}) *gomock.Call

EstimateGas indicates an expected call of EstimateGas.

func (*MockClientMockRecorder) FeeHistory

func (mr *MockClientMockRecorder) FeeHistory(ctx, blockCount, lastBlock, rewardPercentiles interface{}) *gomock.Call

FeeHistory indicates an expected call of FeeHistory.

func (*MockClientMockRecorder) FilterLogs

func (mr *MockClientMockRecorder) FilterLogs(ctx, q interface{}) *gomock.Call

FilterLogs indicates an expected call of FilterLogs.

func (*MockClientMockRecorder) HeaderByHash

func (mr *MockClientMockRecorder) HeaderByHash(ctx, hash interface{}) *gomock.Call

HeaderByHash indicates an expected call of HeaderByHash.

func (*MockClientMockRecorder) HeaderByNumber

func (mr *MockClientMockRecorder) HeaderByNumber(ctx, number interface{}) *gomock.Call

HeaderByNumber indicates an expected call of HeaderByNumber.

func (*MockClientMockRecorder) NetworkID

func (mr *MockClientMockRecorder) NetworkID(ctx interface{}) *gomock.Call

NetworkID indicates an expected call of NetworkID.

func (*MockClientMockRecorder) NonceAt

func (mr *MockClientMockRecorder) NonceAt(ctx, account, blockNumber interface{}) *gomock.Call

NonceAt indicates an expected call of NonceAt.

func (*MockClientMockRecorder) PeerCount

func (mr *MockClientMockRecorder) PeerCount(ctx interface{}) *gomock.Call

PeerCount indicates an expected call of PeerCount.

func (*MockClientMockRecorder) PendingBalanceAt

func (mr *MockClientMockRecorder) PendingBalanceAt(ctx, account interface{}) *gomock.Call

PendingBalanceAt indicates an expected call of PendingBalanceAt.

func (*MockClientMockRecorder) PendingCallContract

func (mr *MockClientMockRecorder) PendingCallContract(ctx, msg interface{}) *gomock.Call

PendingCallContract indicates an expected call of PendingCallContract.

func (*MockClientMockRecorder) PendingCodeAt

func (mr *MockClientMockRecorder) PendingCodeAt(ctx, account interface{}) *gomock.Call

PendingCodeAt indicates an expected call of PendingCodeAt.

func (*MockClientMockRecorder) PendingNonceAt

func (mr *MockClientMockRecorder) PendingNonceAt(ctx, account interface{}) *gomock.Call

PendingNonceAt indicates an expected call of PendingNonceAt.

func (*MockClientMockRecorder) PendingStorageAt

func (mr *MockClientMockRecorder) PendingStorageAt(ctx, account, key interface{}) *gomock.Call

PendingStorageAt indicates an expected call of PendingStorageAt.

func (*MockClientMockRecorder) PendingTransactionCount

func (mr *MockClientMockRecorder) PendingTransactionCount(ctx interface{}) *gomock.Call

PendingTransactionCount indicates an expected call of PendingTransactionCount.

func (*MockClientMockRecorder) SendTransaction

func (mr *MockClientMockRecorder) SendTransaction(ctx, tx interface{}) *gomock.Call

SendTransaction indicates an expected call of SendTransaction.

func (*MockClientMockRecorder) StorageAt

func (mr *MockClientMockRecorder) StorageAt(ctx, account, key, blockNumber interface{}) *gomock.Call

StorageAt indicates an expected call of StorageAt.

func (*MockClientMockRecorder) SubscribeFilterLogs

func (mr *MockClientMockRecorder) SubscribeFilterLogs(ctx, q, ch interface{}) *gomock.Call

SubscribeFilterLogs indicates an expected call of SubscribeFilterLogs.

func (*MockClientMockRecorder) SubscribeNewHead

func (mr *MockClientMockRecorder) SubscribeNewHead(ctx, ch interface{}) *gomock.Call

SubscribeNewHead indicates an expected call of SubscribeNewHead.

func (*MockClientMockRecorder) SuggestGasPrice

func (mr *MockClientMockRecorder) SuggestGasPrice(ctx interface{}) *gomock.Call

SuggestGasPrice indicates an expected call of SuggestGasPrice.

func (*MockClientMockRecorder) SuggestGasTipCap

func (mr *MockClientMockRecorder) SuggestGasTipCap(ctx interface{}) *gomock.Call

SuggestGasTipCap indicates an expected call of SuggestGasTipCap.

func (*MockClientMockRecorder) SyncProgress

func (mr *MockClientMockRecorder) SyncProgress(ctx interface{}) *gomock.Call

SyncProgress indicates an expected call of SyncProgress.

func (*MockClientMockRecorder) TransactionByHash

func (mr *MockClientMockRecorder) TransactionByHash(ctx, hash interface{}) *gomock.Call

TransactionByHash indicates an expected call of TransactionByHash.

func (*MockClientMockRecorder) TransactionCount

func (mr *MockClientMockRecorder) TransactionCount(ctx, blockHash interface{}) *gomock.Call

TransactionCount indicates an expected call of TransactionCount.

func (*MockClientMockRecorder) TransactionInBlock

func (mr *MockClientMockRecorder) TransactionInBlock(ctx, blockHash, index interface{}) *gomock.Call

TransactionInBlock indicates an expected call of TransactionInBlock.

func (*MockClientMockRecorder) TransactionReceipt

func (mr *MockClientMockRecorder) TransactionReceipt(ctx, txHash interface{}) *gomock.Call

TransactionReceipt indicates an expected call of TransactionReceipt.

func (*MockClientMockRecorder) TransactionSender

func (mr *MockClientMockRecorder) TransactionSender(ctx, tx, block, index interface{}) *gomock.Call

TransactionSender indicates an expected call of TransactionSender.

Jump to

Keyboard shortcuts

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