Documentation ¶
Index ¶
- func ContainsDuplicate[T any](arr []T) bool
- func CreateRandomAccounts(numAccts int) []sdk.AccAddress
- func Filter[T interface{}](filter func(T) bool, s []T) []T
- func FilteredPaginateAccountBalances(ctx sdk.Context, bankKeeper types.BankKeeper, address sdk.AccAddress, ...) (*query.PageResponse, error)
- func MakeNew[T any]() T
- func ParseSdkDecFromString(s, separator string) ([]math.LegacyDec, error)
- func ParseSdkIntFromString(s, separator string) ([]math.Int, error)
- func ParseUint64SliceFromString(s, separator string) ([]uint64, error)
- func ReverseSlice[T any](s []T) []T
- func RootDir() string
- func SanitizeCoins(coins []sdk.Coin) sdk.Coins
- func SortSlice[T constraints.Ordered](s []T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsDuplicate ¶
ContainsDuplicate checks if there are any duplicate elements in the slice.
func CreateRandomAccounts ¶
func CreateRandomAccounts(numAccts int) []sdk.AccAddress
CreateRandomAccounts is a function return a list of randomly generated AccAddresses
func FilteredPaginateAccountBalances ¶
func FilteredPaginateAccountBalances( ctx sdk.Context, bankKeeper types.BankKeeper, address sdk.AccAddress, pageRequest *query.PageRequest, onResult func(coin sdk.Coin, accumulate bool) bool, ) (*query.PageResponse, error)
func MakeNew ¶
func MakeNew[T any]() T
MakeNew makes a new instance of generic T. if T is a pointer, makes a new instance of the underlying struct via reflection, and then a pointer to it.
func ParseSdkDecFromString ¶
func ReverseSlice ¶
func ReverseSlice[T any](s []T) []T
ReverseSlice reverses the input slice in place. Does mutate argument.
func SanitizeCoins ¶
SanitizeCoins takes an unsorted list of coins and sorts them, removes coins with amount zero and combines duplicate coins
func SortSlice ¶
func SortSlice[T constraints.Ordered](s []T)
SortSlice sorts a slice of type T elements that implement constraints.Ordered. Mutates input slice s
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.