Documentation ¶
Index ¶
- func RandCoin(r *rand.Rand, coins sdk.Coins) sdk.Coins
- func RandExponentialCoin(r *rand.Rand, coin sdk.Coin) sdk.Coin
- func RandIntBetween(r *rand.Rand, min, max int) int
- func RandPositiveInt(r *rand.Rand, max osmomath.Int) (osmomath.Int, error)
- func RandStringOfLength(r *rand.Rand, n int) string
- func RandSubsetCoins(r *rand.Rand, coins sdk.Coins) sdk.Coins
- func RandTimestamp(r *rand.Rand) time.Time
- func RandomAmount(r *rand.Rand, max osmomath.Int) osmomath.Int
- func RandomDecAmount(r *rand.Rand, max osmomath.Dec) osmomath.Dec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandExponentialCoin ¶
RandGeometricCoin uniformly samples a denom from the addr's balances. Then it samples an Exponentially distributed amount of the addr's coins, with rate = 10. (Meaning that on average it samples 10% of the chosen balance) Pre-condition: Addr must have a spendable balance
func RandIntBetween ¶
RandIntBetween returns a random int between two numbers inclusively.
func RandPositiveInt ¶
RandPositiveInt get a rand positive osmomath.Int
func RandStringOfLength ¶
RandStringOfLength generates a random string of a particular length
func RandSubsetCoins ¶
returns random subset of the provided coins will return at least one coin unless coins argument is empty or malformed i.e. 0 amt in coins
func RandTimestamp ¶
RandTimestamp generates a random timestamp
func RandomAmount ¶
RandomAmount generates a random amount Note: The range of RandomAmount includes max, and is, in fact, biased to return max as well as 0.
Types ¶
This section is empty.