simulation

package
v0.46.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgStoreCode           = "op_weight_msg_store_code"
	OpWeightMsgInstantiateContract = "op_weight_msg_instantiate_contract"
	OpReflectContractPath          = "op_reflect_contract_path"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func ParamChanges

func ParamChanges(r *rand.Rand, cdc codec.Codec) []simtypes.ParamChange

func RandomParams

func RandomParams(r *rand.Rand) types.Params

func RandomizedGenState

func RandomizedGenState(simstate *module.SimulationState)

RandomizeGenState generates a random GenesisState for wasm

func SimulateMsgInstantiateContract added in v0.46.0

func SimulateMsgInstantiateContract(ak types.AccountKeeper, bk simulation.BankKeeper, wasmKeeper WasmKeeper) simtypes.Operation

SimulateMsgInstantiateContract generates a MsgInstantiateContract with random values

func SimulateMsgStoreCode added in v0.46.0

func SimulateMsgStoreCode(ak types.AccountKeeper, bk simulation.BankKeeper, wasmKeeper WasmKeeper, wasmBz []byte) simtypes.Operation

SimulateMsgStoreCode generates a MsgStoreCode with random values

func WeightedOperations added in v0.46.0

func WeightedOperations(
	simstate *module.SimulationState,
	ak types.AccountKeeper,
	bk simulation.BankKeeper,
	wasmKeeper WasmKeeper,
) simulation.WeightedOperations

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

Types

type WasmKeeper added in v0.46.0

type WasmKeeper interface {
	GetParams(ctx sdk.Context) types.Params
	IterateCodeInfos(ctx sdk.Context, cb func(uint64, types.CodeInfo) bool)
}

WasmKeeper is a subset of the wasm keeper used by simulations

Jump to

Keyboard shortcuts

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