mock

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: BSD-3-Clause Imports: 5 Imported by: 1

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