utils

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainAny

func ContainAny[T constraints.Ordered](src []T, trg T) bool

func DecodeToString added in v0.2.4

func DecodeToString(v string) (string, error)

func FilterNonAccountAddresses

func FilterNonAccountAddresses(addresses []string) []string

FilterNonAccountAddresses returns a slice containing only account addresses.

func GetGenesisAccounts

func GetGenesisAccounts(appState map[string]json.RawMessage, cdc codec.Codec) ([]types.Account, error)

GetGenesisAccounts parses the given appState and returns the genesis accounts

func ParseCoinsFromString

func ParseCoinsFromString(value string) (types.Coins, error)

ParseCoinsFromString converts string to coin type

func TimeFromPtr added in v0.0.4

func TimeFromPtr(t *time.Time) time.Time

TimeFromPtr returns time.Time from *time.Time. If t is nil, returns time.Time{}.

Types

This section is empty.

Jump to

Keyboard shortcuts

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