utils

package
v0.1.429-bweng-test-1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const HardFailPrefix = "hard fail error occurred"

Variables

This section is empty.

Functions

func ConvertMicroToWholeDenom

func ConvertMicroToWholeDenom(amount sdk.Dec, denom string) (sdk.Dec, string, error)

func ConvertWholeToMicroDenom

func ConvertWholeToMicroDenom(amount sdk.Dec, denom string) (sdk.Dec, string, error)

func DecorateHardFailError

func DecorateHardFailError(err error) error

func Filter

func Filter[T any](slice []T, lambda func(t T) bool) []T

func FilterUInt64Slice

func FilterUInt64Slice(slice []uint64, item uint64) []uint64

func Map

func Map[I any, O any](input []I, lambda func(i I) O) []O

func MetricsPanicCallback

func MetricsPanicCallback(err any, ctx sdk.Context, key string)

func PanicHandler

func PanicHandler(recoverCallback func(any)) func()

func PtrCopier

func PtrCopier[T any](item *T) *T

func Reduce

func Reduce[I, O any](input []I, reducer func(I, O) O, initial O) O

func SliceCopy

func SliceCopy[T any](slice []T) []T

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