utils

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoxOwnerCheck

func BoxOwnerCheck(cdc *codec.Codec, cliCtx context.CLIContext, sender auth.Account, boxID string) (types.Box, error)

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 CheckBoxId

func CheckBoxId(boxID string) sdk.Error

func GetBoxByID

func GetBoxByID(cdc *codec.Codec, cliCtx context.CLIContext, boxID string) (types.Box, error)

func GetBoxCoinByDecimal

func GetBoxCoinByDecimal(cdc *codec.Codec, cliCtx context.CLIContext, coin sdk.Coin) sdk.Coin

func GetBoxTags

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

func GetBoxTypeByValue

func GetBoxTypeByValue(value string) string

func GetCoinDenomByFutureBoxSeq

func GetCoinDenomByFutureBoxSeq(boxID string, seq int) string

func GetMaxPrecision

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

func GetSeqFromFutureBoxSeq

func GetSeqFromFutureBoxSeq(boxSeqStr string) int

func IsBoxId

func IsBoxId(boxID 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