utils

package
v0.2.5-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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