simtesting

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSimAccount

func GetSimAccount(address sdk.Address, accs []simtypes.Account) (simtypes.Account, bool)

GetSimAccount gets the Account with the given address

func RandomCoin

func RandomCoin(r *rand.Rand, denom string, maxAmount int) sdk.Coin

RandomCoin returns a random coin having the specified denomination and the max given amount

func RandomDecCoins

func RandomDecCoins(r *rand.Rand, denoms []string, maxAmount sdkmath.LegacyDec) sdk.DecCoins

RandomDecCoins returns a random list of DecCoins by randomly selecting a sub set of the provided denoms.

func RandomDuration

func RandomDuration(r *rand.Rand, min time.Duration, max time.Duration) time.Duration

RandomDuration returns a random duration between the min and max

func RandomFutureTime

func RandomFutureTime(r *rand.Rand, currentTime time.Time) time.Time

RandomFutureTime returns a random future time

func RandomPositiveUint32

func RandomPositiveUint32(r *rand.Rand) uint32

RandomPositiveUint32 returns a random positive uint32

func RandomPositiveUint64

func RandomPositiveUint64(r *rand.Rand) uint64

RandomPositiveUint64 returns a random positive uint64

func RandomSliceElement

func RandomSliceElement[T any](r *rand.Rand, slice []T) T

RandomSliceElement returns a random element from the given slice

func RandomSubSlice

func RandomSubSlice[T any](r *rand.Rand, items []T) []T

RandomSubSlice returns a random subset of the given slice

func SendMsg

SendMsg sends a transaction with the specified message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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