* ibc-transfer: sims updates * params and genesis * sim tests * update module.go * remove dontcover * Update x/ibc-transfer/simulation/decoder.go Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
33 lines
985 B
Go
33 lines
985 B
Go
package simulation
|
|
|
|
import (
|
|
"fmt"
|
|
"math/rand"
|
|
|
|
gogotypes "github.com/gogo/protobuf/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/simulation"
|
|
|
|
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
|
"github.com/cosmos/cosmos-sdk/x/ibc-transfer/types"
|
|
)
|
|
|
|
// ParamChanges defines the parameters that can be modified by param change proposals
|
|
// on the simulation
|
|
func ParamChanges(r *rand.Rand) []simtypes.ParamChange {
|
|
return []simtypes.ParamChange{
|
|
simulation.NewSimParamChange(types.ModuleName, string(types.KeySendEnabled),
|
|
func(r *rand.Rand) string {
|
|
sendEnabled := RadomEnabled(r)
|
|
return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: sendEnabled}))
|
|
},
|
|
),
|
|
simulation.NewSimParamChange(types.ModuleName, string(types.KeyReceiveEnabled),
|
|
func(r *rand.Rand) string {
|
|
receiveEnabled := RadomEnabled(r)
|
|
return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled}))
|
|
},
|
|
),
|
|
}
|
|
}
|