utils

package
v0.7.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcInterest

func CalcInterest(perCoupon sdk.Dec, share sdk.Int, interest types.BoxToken) sdk.Int

func CalcInterestRate

func CalcInterestRate(totalAmount sdk.Int, price sdk.Int, interest sdk.Coin, decimals uint) sdk.Dec

func CheckId added in v0.6.0

func CheckId(id string) sdk.Error

func GetBoxTags

func GetBoxTags(id string, boxType string, sender sdk.AccAddress) sdk.Tags

func GetBoxTypeByValue

func GetBoxTypeByValue(value string) string

func GetCoinDenomByFutureBoxSeq

func GetCoinDenomByFutureBoxSeq(id string, seq int) string

func GetIdFromBoxSeqID added in v0.6.0

func GetIdFromBoxSeqID(idSeq string) string

func GetMaxPrecision

func GetMaxPrecision(dec sdk.Dec, decimals uint) sdk.Dec

func GetSeqFromFutureBoxSeq

func GetSeqFromFutureBoxSeq(boxSeqStr string) int

func IsId added in v0.6.0

func IsId(id string) bool

func MulDecimals

func MulDecimals(coin sdk.Coin, decimals uint) sdk.Int

func ParseCoin

func ParseCoin(denom string, amount sdk.Int) sdk.Coin

Types

This section is empty.

Jump to

Keyboard shortcuts

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