cosmos-sdk: Index | Files

package simulation

import ""


Package Files

decoder.go genesis.go operations.go params.go


const (
    OpWeightMsgSend      = "op_weight_msg_send"
    OpWeightMsgMultiSend = "op_weight_msg_multisend"

Simulation operation weights constants

func NewDecodeStore Uses

func NewDecodeStore(cdc SupplyUnmarshaller) func(kvA, kvB kv.Pair) string

NewDecodeStore returns a function closure that unmarshals the KVPair's values to the corresponding types.

func ParamChanges Uses

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

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

func RandomGenesisBalances Uses

func RandomGenesisBalances(simState *module.SimulationState) []types.Balance

RandomGenesisAccounts returns a slice of account balances. Each account has a balance of simState.InitialStake for sdk.DefaultBondDenom.

func RandomGenesisDefaultSendParam Uses

func RandomGenesisDefaultSendParam(r *rand.Rand) bool

RandomGenesisDefaultSendParam computes randomized allow all send transfers param for the bank module

func RandomGenesisSendParams Uses

func RandomGenesisSendParams(r *rand.Rand) types.SendEnabledParams

RandomGenesisSendParams randomized Parameters for the bank module

func RandomizedGenState Uses

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for bank

func SimulateMsgMultiSend Uses

func SimulateMsgMultiSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operation

SimulateMsgMultiSend tests and runs a single msg multisend, with randomized, capped number of inputs/outputs. all accounts in msg fields exist in state

func SimulateMsgSend Uses

func SimulateMsgSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operation

SimulateMsgSend tests and runs a single msg send where both accounts already exist.

func WeightedOperations Uses

func WeightedOperations(
    appParams simtypes.AppParams, cdc codec.JSONMarshaler, ak types.AccountKeeper, bk keeper.Keeper,
) simulation.WeightedOperations

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

type SupplyUnmarshaller Uses

type SupplyUnmarshaller interface {
    UnmarshalSupply([]byte) (exported.SupplyI, error)

Package simulation imports 16 packages (graph) and is imported by 1 packages. Updated 2020-08-13. Refresh now. Tools for package owners.