github.com/okex/exchain@v1.8.0/libs/ibc-go/modules/apps/transfer/simulation/params.go (about) 1 package simulation 2 3 import ( 4 "math/rand" 5 6 gogotypes "github.com/gogo/protobuf/types" 7 "github.com/okex/exchain/libs/cosmos-sdk/x/simulation" 8 "github.com/okex/exchain/libs/ibc-go/modules/apps/transfer/types" 9 ) 10 11 // ParamChanges defines the parameters that can be modified by param change proposals 12 // on the simulation 13 func ParamChanges(r *rand.Rand) []simulation.ParamChange { 14 return []simulation.ParamChange{ 15 simulation.NewSimParamChange(types.ModuleName, string(types.KeySendEnabled), 16 func(r *rand.Rand) string { 17 sendEnabled := RadomEnabled(r) 18 return string(types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: sendEnabled})) 19 }, 20 ), 21 simulation.NewSimParamChange(types.ModuleName, string(types.KeyReceiveEnabled), 22 func(r *rand.Rand) string { 23 receiveEnabled := RadomEnabled(r) 24 return string(types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled})) 25 }, 26 ), 27 } 28 }