mock

package
v0.0.0-...-9fdd194 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

Types

type Call

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

func ABICall

func ABICall(abi *abi.ABI, to common.Address, result []byte, method string, params ...interface{}) Call

type Option

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

Option is the option passed to the mock Chequebook service

func WithABICall

func WithABICall(abi *abi.ABI, to common.Address, result []byte, method string, params ...interface{}) Option

func WithABICallSequence

func WithABICallSequence(calls ...Call) Option

func WithABISend

func WithABISend(abi *abi.ABI, txHash common.Hash, expectedAddress common.Address, expectedValue *big.Int, method string, params ...interface{}) Option

func WithBttBalanceAt

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

func WithCallFunc

func WithCallFunc(f func(ctx context.Context, request *transaction.TxRequest) (result []byte, err error)) Option

func WithCancelTransactionFunc

func WithCancelTransactionFunc(f func(ctx context.Context, originalTxHash common.Hash) (common.Hash, error)) Option

func WithEthereumAddress

func WithEthereumAddress(f func(ctx context.Context) (addr common.Address)) Option

func WithMyBttBalance

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

func WithOverlayEthAddress

func WithOverlayEthAddress(f func(ctx context.Context) (addr common.Address)) Option

func WithPendingTransactionsFunc

func WithPendingTransactionsFunc(f func() ([]common.Hash, error)) Option

func WithResendTransactionFunc

func WithResendTransactionFunc(f func(ctx context.Context, txHash common.Hash) error) Option

func WithSendFunc

func WithSendFunc(f func(ctx context.Context, request *transaction.TxRequest) (txHash common.Hash, err error)) Option

func WithSenderAddress

func WithSenderAddress(f func(ctx context.Context) (addr common.Address)) Option

func WithStoredTransactionFunc

func WithStoredTransactionFunc(f func(txHash common.Hash) (*transaction.StoredTransaction, error)) Option

func WithWaitForReceiptFunc

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

Jump to

Keyboard shortcuts

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