utils

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(x int64) uint64

#nosec

func BasePrice

func BasePrice() math_utils.PrecDec

Return the base value for price, 1.0001

func GetBlockGasUsed

func GetBlockGasUsed(ctx sdk.Context) (gasUsed uint64, err error)

func JoinErrors

func JoinErrors(parentError error, errs ...error) error

func MaxIntArr

func MaxIntArr(vals []sdk.Int) sdk.Int

func MinIntArr

func MinIntArr(vals []sdk.Int) sdk.Int

func MustGetBlockGasUsed

func MustGetBlockGasUsed(ctx sdk.Context) uint64

func MustSafeUint64ToInt64

func MustSafeUint64ToInt64(in uint64) (out int64)

func SafeUint64ToInt64

func SafeUint64ToInt64(in uint64) (out int64, overflow bool)

#nosec

func SanitizeCoins

func SanitizeCoins(coins []sdk.Coin) sdk.Coins

SanitizeCoins takes an unsorted list of coins and sorts them, removes coins with amount zero and combines duplicate coins

func Uint64ToSortableString

func Uint64ToSortableString(i uint64) string

#nosec

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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