coins

package
v0.0.0-...-c04c664 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 9 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) 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) AddDelta

func (c *Coins) AddDelta(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, volume *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) SubDelta

func (c *Coins) SubDelta(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
	// contains filtered or unexported fields
}

type Model

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

func (*Model) AddVolume

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

func (Model) IsDirty

func (m Model) IsDirty() bool

func (Model) IsInfoDirty

func (m Model) IsInfoDirty() bool

func (*Model) SetVolume

func (m *Model) SetVolume(volume *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