helpers

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BipToPip

func BipToPip(bip sdkmath.Int) sdkmath.Int

func CalcHashSHA256 added in v0.0.8

func CalcHashSHA256(str string) []byte

CalcHashSHA256 returns sha256 hash (32 bytes) calculated from specified string.

func DecToDecWithE18 added in v0.0.8

func DecToDecWithE18(dec sdk.Dec) sdk.Dec

DecToDecWithE18 converts Dec to Dec*10^18.

func DecToIntWithE18 added in v0.0.8

func DecToIntWithE18(dec sdk.Dec) sdkmath.Int

DecToIntWithE18 converts Dec to Int (dec*10^18 and truncate).

func DurationToString

func DurationToString(d time.Duration) string

DurationToString converts provided duration to human readable string presentation.

func EtherToWei

func EtherToWei(ether sdkmath.Int) sdkmath.Int

EtherToWei converts number 1 to 1 * 10^18.

func FinneyToWei

func FinneyToWei(finney sdkmath.Int) sdkmath.Int

FinneyToWei convert number 1 to 1 * 10^15

func GetReserveLimitFromCRR

func GetReserveLimitFromCRR(crr uint) sdkmath.Int

GetReserveLimitFromCRR returns coin reserve limit for specific CRR value.

func JoinAccAddresses

func JoinAccAddresses(values []sdk.AccAddress) string

JoinAccAddresses returns string containing all provided address joined with ",".

func JoinUints64

func JoinUints64(values []uint64) string

JoinUints returns string containing all provided uint values joined with ",".

func WeiToEther

func WeiToEther(wei sdkmath.Int) sdkmath.Int

WeiToEther convert 1 * 10^18 to 1

func WeiToFinney

func WeiToFinney(wei sdkmath.Int) sdkmath.Int

WeiToFinney converts number 1 * 10^15 to 1.

Types

This section is empty.

Directories

Path Synopsis
Package conv provides internal functions for convertions and data manipulation
Package conv provides internal functions for convertions and data manipulation

Jump to

Keyboard shortcuts

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