simulation

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgCreateAtomicSwap = "op_weight_msg_create_atomic_swap"
)

Simulation operation weights constants

Variables

View Source
var (
	MaxSupplyLimit     = 1000000000000
	MinSupplyLimit     = 100000000
	MinSwapAmountLimit = 999

	ConsistentDenoms = [3]string{"bnb", "xrp", "btc"}
	MinBlockLock     = uint64(5)
)

Functions

func DecodeStore

func DecodeStore(cdc *codec.Codec, kvA, kvB kv.Pair) string

DecodeStore unmarshals the KVPair's Value to the module's corresponding type

func GenAssetSupply added in v0.11.0

func GenAssetSupply(r *rand.Rand, denom string) types.AssetSupply

GenSupplyLimit generates a random SupplyLimit

func GenMaxBlockLock added in v0.8.0

func GenMaxBlockLock(r *rand.Rand, minBlockLock uint64) uint64

GenMaxBlockLock randomized MaxBlockLock

func GenMaxSwapAmount added in v0.11.0

func GenMaxSwapAmount(r *rand.Rand, minAmount sdk.Int, supplyMax sdk.Int) sdk.Int

GenMaxSwapAmount randomized MaxAmount

func GenMinBlockLock added in v0.8.0

func GenMinBlockLock(r *rand.Rand) uint64

GenMinBlockLock randomized MinBlockLock

func GenMinSwapAmount added in v0.11.0

func GenMinSwapAmount(r *rand.Rand) sdk.Int

GenMinSwapAmount randomized MinAmount in range [1, 1000]

func GenRandBnbDeputy added in v0.8.0

func GenRandBnbDeputy(r *rand.Rand) simulation.Account

GenRandBnbDeputy randomized BnbDeputyAddress

func GenRandFixedFee added in v0.11.0

func GenRandFixedFee(r *rand.Rand) sdk.Int

GenRandFixedFee randomized FixedFee in range [1, 10000]

func GenSupplyLimit added in v0.11.0

func GenSupplyLimit(r *rand.Rand, max int) sdk.Int

GenSupplyLimit generates a random SupplyLimit

func GenSupportedAssets added in v0.8.0

func GenSupportedAssets(r *rand.Rand) types.AssetParams

GenSupportedAssets gets randomized SupportedAssets

func ParamChanges

func ParamChanges(r *rand.Rand) []simulation.ParamChange

ParamChanges defines the parameters that can be modified by param change proposals

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState

func SimulateMsgCreateAtomicSwap added in v0.8.0

func SimulateMsgCreateAtomicSwap(ak types.AccountKeeper, k keeper.Keeper) simulation.Operation

SimulateMsgCreateAtomicSwap generates a MsgCreateAtomicSwap with random values

func WeightedOperations added in v0.8.0

func WeightedOperations(
	appParams simulation.AppParams, cdc *codec.Codec, ak types.AccountKeeper, k keeper.Keeper,
) simulation.WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Types

This section is empty.

Jump to

Keyboard shortcuts

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