diff --git a/x/stablestake/migrations/v3_migration.go b/x/stablestake/migrations/v3_migration.go new file mode 100644 index 000000000..5b0184c70 --- /dev/null +++ b/x/stablestake/migrations/v3_migration.go @@ -0,0 +1,13 @@ +package migrations + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (m Migrator) V3Migration(ctx sdk.Context) error { + params := m.keeper.GetParams(ctx) + params.InterestRateMin = sdk.NewDecWithPrec(10, 2) // 10% + params.InterestRateMax = sdk.NewDecWithPrec(50, 2) // 50% + m.keeper.SetParams(ctx, params) + return nil +} diff --git a/x/stablestake/module.go b/x/stablestake/module.go index ed2ef7b88..16ea46d57 100644 --- a/x/stablestake/module.go +++ b/x/stablestake/module.go @@ -117,7 +117,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := migrations.NewMigrator(am.keeper) - err := cfg.RegisterMigration(types.ModuleName, 1, m.V2Migration) + err := cfg.RegisterMigration(types.ModuleName, 2, m.V3Migration) if err != nil { panic(err) }