Documentation ¶
Index ¶
- Constants
- Variables
- func BigIntToFloat64(rawValue *big.Int) float64
- func Float64ToBigInt(amt float64) *big.Int
- func FormatAmount(amt float64) string
- func Init()
- func ParseAmount(coins interface{}) sdk.Int
- func ParseAmountToDec(coins interface{}) sdk.Dec
- func ParseAmountWithDenom(coins interface{}, denom string) sdk.Dec
- func ParseCoinsAmount(coins sdk.Coins, denom string) sdk.Dec
- func ParseDecCoinsAmount(coins sdk.DecCoins, denom string) sdk.Dec
Constants ¶
View Source
const ( ChainPrefix = "astra" Denom = "astra" BaseDenom = "aastra" Decimals = 18 )
Variables ¶
View Source
var AsaDecimalsBigInt = big.NewInt(Decimals)
Functions ¶
func BigIntToFloat64 ¶ added in v0.0.3
BigIntToFloat64 returns the normalized amount without decimals.
func Float64ToBigInt ¶ added in v0.0.3
Float64ToBigInt returns the raw big int value including the decimals.
func FormatAmount ¶
FormatAmount returns string-formatted of the given float64 number.
func ParseAmount ¶ added in v0.0.5
ParseAmount gets the amounts of the given coins w.r.t to the BaseDenom.
func ParseAmountToDec ¶ added in v0.0.5
ParseAmountToDec gets the amounts of the given coins w.r.t to the Denom.
func ParseAmountWithDenom ¶ added in v0.0.5
ParseAmountWithDenom gets the amounts of the given coins w.r.t given denom.
func ParseCoinsAmount ¶ added in v0.0.5
ParseCoinsAmount returns the amount of coins w.r.t the given denom.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.