account

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAccountNotFound  = errors.New("account not found")
	ErrNotEnoughBalance = errors.New("not enough balance")
)

Functions

This section is empty.

Types

type Account

type Account struct {
	Address common.Address
	Amount  uint64
}

type AccountMapper

type AccountMapper interface {
	GetBalance(types.Context, common.Address) (uint64, error)
	AddBalance(types.Context, common.Address, uint64) (uint64, error)
	SubBalance(types.Context, common.Address, uint64) (uint64, error)
	Transfer(types.Context, common.Address, uint64, common.Address) error
}

func NewAccountMapper

func NewAccountMapper(storeKey types.StoreKey) AccountMapper

Jump to

Keyboard shortcuts

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