price

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriceKeeper

type PriceKeeper interface {
	// CoinToMiniDollar - convert minidollar to coin
	// since internally, every coin have a price of minidollar, so any amount of coin
	// can all be converted into minidollar.
	CoinToMiniDollar(coin types.Coin) (bought types.MiniDollar)

	// MiniDollarToCoin - return the maximum coins that @p dollar can buy and
	// the amount of dollar used. The returned value is a pair of (new token, used previous token).
	// As there is a minimum price of coin, for dollars that are less than price of one coin
	// they are not used.
	MiniDollarToCoin(dollar types.MiniDollar) (bought types.Coin, used types.MiniDollar)
}

PriceKeeper - conversion between Coin/MiniDollar at current consensus price.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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