package simulation import ( "fmt" "math/rand" "github.com/cosmos/cosmos-sdk/codec" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" "github.com/CosmWasm/wasmd/x/wasm/types" ) func ParamChanges(r *rand.Rand, cdc codec.Codec) []simtypes.ParamChange { params := types.DefaultParams() return []simtypes.ParamChange{ simulation.NewSimParamChange(types.ModuleName, string(types.ParamStoreKeyUploadAccess), func(r *rand.Rand) string { jsonBz, err := cdc.MarshalJSON(¶ms.CodeUploadAccess) if err != nil { panic(err) } return string(jsonBz) }, ), simulation.NewSimParamChange(types.ModuleName, string(types.ParamStoreKeyInstantiateAccess), func(r *rand.Rand) string { return fmt.Sprintf("%q", params.CodeUploadAccess.Permission.String()) }, ), } }