backendmock

package
v1.12.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) transaction.Backend

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is the option passed to the mock Chequebook service

func WithBalanceAt added in v1.6.0

func WithBalanceAt(f func(ctx context.Context, address common.Address, block *big.Int) (*big.Int, error)) Option

func WithBlockByNumberFunc added in v1.0.0

func WithBlockByNumberFunc(f func(ctx context.Context, number *big.Int) (*types.Block, error)) Option

func WithBlockNumberFunc

func WithBlockNumberFunc(f func(context.Context) (uint64, error)) Option

func WithCodeAtFunc

func WithCodeAtFunc(f func(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)) Option

func WithEstimateGasFunc

func WithEstimateGasFunc(f func(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)) Option

func WithHeaderbyNumberFunc

func WithHeaderbyNumberFunc(f func(ctx context.Context, number *big.Int) (*types.Header, error)) Option

func WithNonceAtFunc

func WithNonceAtFunc(f func(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)) Option

func WithPendingNonceAtFunc

func WithPendingNonceAtFunc(f func(ctx context.Context, account common.Address) (uint64, error)) Option

func WithSendTransactionFunc

func WithSendTransactionFunc(f func(ctx context.Context, tx *types.Transaction) error) Option

func WithSuggestGasPriceFunc

func WithSuggestGasPriceFunc(f func(ctx context.Context) (*big.Int, error)) Option

func WithSuggestGasTipCapFunc added in v1.10.0

func WithSuggestGasTipCapFunc(f func(ctx context.Context) (*big.Int, error)) Option

func WithTransactionByHashFunc

func WithTransactionByHashFunc(f func(ctx context.Context, txHash common.Hash) (*types.Transaction, bool, error)) Option

func WithTransactionReceiptFunc

func WithTransactionReceiptFunc(f func(ctx context.Context, txHash common.Hash) (*types.Receipt, error)) Option

Jump to

Keyboard shortcuts

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