backendmock

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

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 WithBlockByNumberFunc

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 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