mock

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) chain.Traffic

Types

type ChainTrafficMock

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

func (*ChainTrafficMock) BalanceOf

func (m *ChainTrafficMock) BalanceOf(address common.Address) (*big.Int, error)

func (*ChainTrafficMock) CashChequeBeneficiary

func (m *ChainTrafficMock) CashChequeBeneficiary(ctx context.Context, peer boson.Address, beneficiary, recipient common.Address, cumulativePayout *big.Int, signature []byte) (*types.Transaction, error)

func (*ChainTrafficMock) RetrievedAddress

func (m *ChainTrafficMock) RetrievedAddress(address common.Address) ([]common.Address, error)

func (*ChainTrafficMock) RetrievedTotal

func (m *ChainTrafficMock) RetrievedTotal(address common.Address) (*big.Int, error)

func (*ChainTrafficMock) TransAmount

func (m *ChainTrafficMock) TransAmount(beneficiary, recipient common.Address) (*big.Int, error)

func (*ChainTrafficMock) TransferredAddress

func (m *ChainTrafficMock) TransferredAddress(address common.Address) ([]common.Address, error)

func (*ChainTrafficMock) TransferredTotal

func (m *ChainTrafficMock) TransferredTotal(address common.Address) (*big.Int, error)

type Option

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

Option is the option passed to the mock Chequebook service

func WithBalanceOf

func WithBalanceOf(f func(account common.Address) (*big.Int, error)) Option

func WithCashChequeBeneficiary

func WithCashChequeBeneficiary(f func(ctx context.Context, peer boson.Address, beneficiary common.Address, recipient common.Address, cumulativePayout *big.Int, signature []byte) (*types.Transaction, error)) Option

func WithRetrievedAddress

func WithRetrievedAddress(f func(address common.Address) ([]common.Address, error)) Option

func WithRetrievedTotal

func WithRetrievedTotal(f func(address common.Address) (*big.Int, error)) Option

func WithTransAmount

func WithTransAmount(f func(beneficiary, recipient common.Address) (*big.Int, error)) Option

func WithTransferredAddress

func WithTransferredAddress(f func(address common.Address) ([]common.Address, error)) Option

func WithTransferredTotal

func WithTransferredTotal(f func(address common.Address) (*big.Int, error)) Option

Jump to

Keyboard shortcuts

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