simulation

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BnbDeputyAddress  = "bnb_deputy_address"
	BnbDeputyFixedFee = "bnb_deputy_fixed_fee"
	MinAmount         = "min_amount"
	MaxAmount         = "max_amount"
	MinBlockLock      = "min_block_lock"
	MaxBlockLock      = "max_block_lock"
	SupportedAssets   = "supported_assets"
)

Simulation parameter constants

View Source
const (
	OpWeightMsgCreateAtomicSwap = "op_weight_msg_create_atomic_swap"
)

Simulation operation weights constants

Variables

View Source
var (
	MaxSupplyLimit = sdk.NewInt(1000000000000)

	ConsistentDenoms = [3]string{"bnb", "xrp", "btc"}
)

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 GenMaxAmount added in v0.8.0

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

GenMaxAmount randomized MaxAmount

func GenMaxBlockLock added in v0.8.0

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

GenMaxBlockLock randomized MaxBlockLock

func GenMinAmount added in v0.8.0

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

GenMinAmount randomized MinAmount in range [0, 1000000000000]

func GenMinBlockLock added in v0.8.0

func GenMinBlockLock(r *rand.Rand) uint64

GenMinBlockLock randomized MinBlockLock

func GenRandBnbDeputy added in v0.8.0

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

GenRandBnbDeputy randomized BnbDeputyAddress

func GenRandBnbDeputyFixedFee added in v0.8.0

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

GenRandBnbDeputyFixedFee randomized BnbDeputyFixedFee in range [2, 10000]

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