mocks

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: AGPL-3.0 Imports: 8 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 {
	mock.Mock
}

func (*Client) Balance added in v0.9.0

func (e *Client) Balance(ctx context.Context, address types.Address) (*big.Int, error)

func (*Client) Block added in v0.7.1

func (e *Client) Block(ctx context.Context) (*types.Block, error)

func (*Client) BlockNumber added in v0.5.0

func (e *Client) BlockNumber(ctx context.Context) (*big.Int, error)

func (*Client) Call

func (e *Client) Call(ctx context.Context, call types.Call) ([]byte, error)

func (*Client) CallBlocks added in v0.5.0

func (e *Client) CallBlocks(ctx context.Context, call types.Call, blocks []int64) ([][]byte, error)

func (*Client) FilterLogs added in v0.7.1

func (e *Client) FilterLogs(ctx context.Context, query types.FilterLogsQuery) ([]types.Log, error)

func (*Client) MultiCall

func (e *Client) MultiCall(ctx context.Context, calls []types.Call) ([][]byte, error)

func (*Client) SendTransaction

func (e *Client) SendTransaction(ctx context.Context, transaction *types.Transaction) (*types.Hash, error)

func (*Client) Storage

func (e *Client) Storage(ctx context.Context, address types.Address, key types.Hash) ([]byte, error)

type Key added in v0.10.0

type Key struct {
	mock.Mock
}

func (*Key) Address added in v0.10.0

func (k *Key) Address() types.Address

func (*Key) SignHash added in v0.10.0

func (k *Key) SignHash(hash types.Hash) (*types.Signature, error)

func (*Key) SignMessage added in v0.10.0

func (k *Key) SignMessage(data []byte) (*types.Signature, error)

func (*Key) SignTransaction added in v0.10.0

func (k *Key) SignTransaction(tx *types.Transaction) error

func (*Key) VerifyHash added in v0.10.0

func (k *Key) VerifyHash(hash types.Hash, sig types.Signature) bool

func (*Key) VerifyMessage added in v0.10.0

func (k *Key) VerifyMessage(data []byte, sig types.Signature) bool

type RPC added in v0.10.0

type RPC struct {
	mock.Mock
}

func (*RPC) Accounts added in v0.10.0

func (r *RPC) Accounts(ctx context.Context) ([]types.Address, error)

func (*RPC) BlockByHash added in v0.10.0

func (r *RPC) BlockByHash(ctx context.Context, hash types.Hash, full bool) (*types.Block, error)

func (*RPC) BlockByNumber added in v0.10.0

func (r *RPC) BlockByNumber(ctx context.Context, number types.BlockNumber, full bool) (*types.Block, error)

func (*RPC) BlockNumber added in v0.10.0

func (r *RPC) BlockNumber(ctx context.Context) (*big.Int, error)

func (*RPC) Call added in v0.10.0

func (r *RPC) Call(ctx context.Context, call types.Call, block types.BlockNumber) ([]byte, *types.Call, error)

func (*RPC) ChainID added in v0.10.0

func (r *RPC) ChainID(ctx context.Context) (uint64, error)

func (*RPC) EstimateGas added in v0.10.0

func (r *RPC) EstimateGas(ctx context.Context, call types.Call, block types.BlockNumber) (uint64, error)

func (*RPC) GasPrice added in v0.10.0

func (r *RPC) GasPrice(ctx context.Context) (*big.Int, error)

func (*RPC) GetBalance added in v0.10.0

func (r *RPC) GetBalance(ctx context.Context, address types.Address, block types.BlockNumber) (*big.Int, error)

func (*RPC) GetBlockTransactionCountByHash added in v0.10.0

func (r *RPC) GetBlockTransactionCountByHash(ctx context.Context, hash types.Hash) (uint64, error)

func (*RPC) GetBlockTransactionCountByNumber added in v0.10.0

func (r *RPC) GetBlockTransactionCountByNumber(ctx context.Context, number types.BlockNumber) (uint64, error)

func (*RPC) GetCode added in v0.10.0

func (r *RPC) GetCode(ctx context.Context, account types.Address, block types.BlockNumber) ([]byte, error)

func (*RPC) GetLogs added in v0.10.0

func (r *RPC) GetLogs(ctx context.Context, query types.FilterLogsQuery) ([]types.Log, error)

func (*RPC) GetStorageAt added in v0.10.0

func (r *RPC) GetStorageAt(ctx context.Context, account types.Address, key types.Hash, block types.BlockNumber) (*types.Hash, error)

func (*RPC) GetTransactionByBlockHashAndIndex added in v0.10.0

func (r *RPC) GetTransactionByBlockHashAndIndex(ctx context.Context, hash types.Hash, index uint64) (*types.OnChainTransaction, error)

func (*RPC) GetTransactionByBlockNumberAndIndex added in v0.10.0

func (r *RPC) GetTransactionByBlockNumberAndIndex(ctx context.Context, number types.BlockNumber, index uint64) (*types.OnChainTransaction, error)

func (*RPC) GetTransactionByHash added in v0.10.0

func (r *RPC) GetTransactionByHash(ctx context.Context, hash types.Hash) (*types.OnChainTransaction, error)

func (*RPC) GetTransactionCount added in v0.10.0

func (r *RPC) GetTransactionCount(ctx context.Context, account types.Address, block types.BlockNumber) (uint64, error)

func (*RPC) GetTransactionReceipt added in v0.10.0

func (r *RPC) GetTransactionReceipt(ctx context.Context, hash types.Hash) (*types.TransactionReceipt, error)

func (*RPC) GetUncleCountByBlockHash added in v0.10.0

func (r *RPC) GetUncleCountByBlockHash(ctx context.Context, hash types.Hash) (uint64, error)

func (*RPC) GetUncleCountByBlockNumber added in v0.10.0

func (r *RPC) GetUncleCountByBlockNumber(ctx context.Context, number types.BlockNumber) (uint64, error)

func (*RPC) MaxPriorityFeePerGas added in v0.10.0

func (r *RPC) MaxPriorityFeePerGas(ctx context.Context) (*big.Int, error)

func (*RPC) SendRawTransaction added in v0.10.0

func (r *RPC) SendRawTransaction(ctx context.Context, data []byte) (*types.Hash, error)

func (*RPC) SendTransaction added in v0.10.0

func (r *RPC) SendTransaction(ctx context.Context, tx types.Transaction) (*types.Hash, *types.Transaction, error)

func (*RPC) Sign added in v0.10.0

func (r *RPC) Sign(ctx context.Context, account types.Address, data []byte) (*types.Signature, error)

func (*RPC) SignTransaction added in v0.10.0

func (r *RPC) SignTransaction(ctx context.Context, tx types.Transaction) ([]byte, *types.Transaction, error)

func (*RPC) SubscribeLogs added in v0.10.0

func (r *RPC) SubscribeLogs(ctx context.Context, query types.FilterLogsQuery) (chan types.Log, error)

func (*RPC) SubscribeNewHeads added in v0.10.0

func (r *RPC) SubscribeNewHeads(ctx context.Context) (chan types.Block, error)

func (*RPC) SubscribeNewPendingTransactions added in v0.10.0

func (r *RPC) SubscribeNewPendingTransactions(ctx context.Context) (chan types.Hash, error)

type Recoverer added in v0.10.0

type Recoverer struct {
	mock.Mock
}

func (*Recoverer) Recover added in v0.11.4

func (*Recoverer) RecoverHash added in v0.10.0

func (r *Recoverer) RecoverHash(hash types.Hash, sig types.Signature) (*types.Address, error)

func (*Recoverer) RecoverMessage added in v0.10.0

func (r *Recoverer) RecoverMessage(data []byte, sig types.Signature) (*types.Address, error)

func (*Recoverer) RecoverTransaction added in v0.10.0

func (r *Recoverer) RecoverTransaction(tx *types.Transaction) (*types.Address, error)

func (*Recoverer) Supports added in v0.11.4

func (r *Recoverer) Supports(_ context.Context, _ datapoint.Point) bool

Jump to

Keyboard shortcuts

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