mock

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

Types

type Option

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

Option is the option passed to the mock Chequebook service

func WithBalanceOfFunc

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

func WithTransferFunc

func WithTransferFunc(f func(ctx context.Context, address common.Address, value *big.Int) (common.Hash, error)) Option

type Service

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

func (*Service) BalanceOf

func (s *Service) BalanceOf(ctx context.Context, address common.Address) (*big.Int, error)

func (*Service) Transfer

func (s *Service) Transfer(ctx context.Context, address common.Address, value *big.Int) (common.Hash, error)

Jump to

Keyboard shortcuts

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