fees

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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