coins

package
v1.1.0-beta12 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

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

func NewBus

func NewBus(coins *Coins) *Bus

func (*Bus) GetCoin

func (b *Bus) GetCoin(symbol types.CoinSymbol) *bus.Coin

func (*Bus) SubCoinReserve

func (b *Bus) SubCoinReserve(symbol types.CoinSymbol, amount *big.Int)

func (*Bus) SubCoinVolume

func (b *Bus) SubCoinVolume(symbol types.CoinSymbol, amount *big.Int)

type Coins

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

func NewCoins

func NewCoins(stateBus *bus.Bus, iavl tree.Tree) (*Coins, error)

func (*Coins) AddReserve

func (c *Coins) AddReserve(symbol types.CoinSymbol, amount *big.Int)

func (*Coins) AddVolume

func (c *Coins) AddVolume(symbol types.CoinSymbol, amount *big.Int)

func (*Coins) Commit

func (c *Coins) Commit() error

func (*Coins) Create

func (c *Coins) Create(symbol types.CoinSymbol, name string, volume *big.Int, crr uint, reserve *big.Int, maxSupply *big.Int)

func (*Coins) Exists

func (c *Coins) Exists(symbol types.CoinSymbol) bool

func (*Coins) Export

func (c *Coins) Export(state *types.AppState)

func (*Coins) GetCoin

func (c *Coins) GetCoin(symbol types.CoinSymbol) *Model

func (*Coins) SubReserve

func (c *Coins) SubReserve(symbol types.CoinSymbol, amount *big.Int)

func (*Coins) SubVolume

func (c *Coins) SubVolume(symbol types.CoinSymbol, amount *big.Int)

type Info

type Info struct {
	Volume  *big.Int
	Reserve *big.Int
	// contains filtered or unexported fields
}

type Model

type Model struct {
	CName      string
	CCrr       uint
	CMaxSupply *big.Int
	// contains filtered or unexported fields
}

func (*Model) AddReserve

func (m *Model) AddReserve(amount *big.Int)

func (*Model) AddVolume

func (m *Model) AddVolume(amount *big.Int)

func (*Model) CheckReserveUnderflow

func (m *Model) CheckReserveUnderflow(delta *big.Int) error

func (Model) Crr

func (m Model) Crr() uint

func (Model) IsDirty

func (m Model) IsDirty() bool

func (Model) IsInfoDirty

func (m Model) IsInfoDirty() bool

func (Model) MaxSupply

func (m Model) MaxSupply() *big.Int

func (Model) Name

func (m Model) Name() string

func (Model) Reserve

func (m Model) Reserve() *big.Int

func (*Model) SetReserve

func (m *Model) SetReserve(reserve *big.Int)

func (*Model) SetVolume

func (m *Model) SetVolume(volume *big.Int)

func (*Model) SubReserve

func (m *Model) SubReserve(amount *big.Int)

func (*Model) SubVolume

func (m *Model) SubVolume(amount *big.Int)

func (Model) Symbol

func (m Model) Symbol() types.CoinSymbol

func (Model) Volume

func (m Model) Volume() *big.Int

Jump to

Keyboard shortcuts

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