fees

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POOL_KEY        = "00000000000000000000"
	FEE_LOCK_BLOCKS = int64(3)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FeeOption

type FeeOption struct {
	FeeCurrency   balance.Currency `json:"feeCurrency"`
	MinFeeDecimal int64            `json:"minFeeDecimal"`
	// contains filtered or unexported fields
}

func (*FeeOption) MinFee

func (fo *FeeOption) MinFee() balance.Coin

type Store

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

func NewStore

func NewStore(prefix string, state *storage.State) *Store

func (*Store) AddToAddress

func (st *Store) AddToAddress(addr keys.Address, coin balance.Coin) error

func (*Store) AddToPool

func (st *Store) AddToPool(coin balance.Coin) error

func (*Store) Exists

func (st *Store) Exists(address keys.Address) bool

func (*Store) Get

func (st *Store) Get(address []byte) (coin balance.Coin, err error)

func (*Store) GetAllowedWithdraw

func (st *Store) GetAllowedWithdraw(addr keys.Address) balance.Coin

func (*Store) GetOpt

func (st *Store) GetOpt() *FeeOption

func (*Store) Iterate

func (st *Store) Iterate(fn func(addr keys.Address, coin balance.Coin) (stop bool)) bool

func (*Store) MinusFromAddress

func (st *Store) MinusFromAddress(addr keys.Address, coin balance.Coin) error

func (*Store) MinusFromPool

func (st *Store) MinusFromPool(coin balance.Coin) error

func (*Store) Set

func (st *Store) Set(address keys.Address, coin balance.Coin) error

func (*Store) SetupOpt

func (st *Store) SetupOpt(feeOpt *FeeOption)

func (*Store) WithState

func (st *Store) WithState(state *storage.State) *Store

Jump to

Keyboard shortcuts

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