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 ¶
func ContainsDuplicate[T any](arr []T) bool
ContainsDuplicate checks if there are any duplicate elements in the slice.
func CreateRandomAccounts ¶
func CreateRandomAccounts(numAccts int) []sdk.AccAddress
CreateRandomAccounts is a function that returns 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 ParseSdkDecFromString(s, separator string) ([]math.LegacyDec, error)
func ParseSdkIntFromString ¶
func ParseSdkIntFromString(s, separator string) ([]math.Int, error)
func ParseUint64SliceFromString ¶
func ParseUint64SliceFromString(s, separator string) ([]uint64, error)
func ReverseSlice ¶
func ReverseSlice[T any](s []T) []T
ReverseSlice reverses the input slice in place. Does mutate argument.
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.