util

package
v12.0.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](x T, ls []T) bool

Contains returns true if x is in ls

func GetFirstValueInRange

func GetFirstValueInRange[T any](storeObj store.KVStore, keyStart []byte, keyEnd []byte, reverseIterate bool, parseValue func([]byte) (T, error)) (T, error)

func GetValueInRange

func GetValueInRange[T any](storeObj store.KVStore, keyStart []byte, keyEnd []byte, reverseIterate bool, parseValue func([]byte) (T, error)) ([]T, error)

func PrintOrErr

func PrintOrErr(resp proto.Message, err error, cctx client.Context) error

PrintOrErr formats and print proto message to the standard output, unless the error is not nil.

func RemoveValueInRange

func RemoveValueInRange(storeObj store.KVStore, keyStart []byte, keyEnd []byte, reverseIterate bool)

func Signers

func Signers(signers ...string) []sdk.AccAddress

Signers converts signer bech32 addresses to sdk.AccAddress list. The function ignores errors. It is supposed to be used within Msg.GetSigners implementation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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