Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 68114ab

Browse files
committed
set inflation max and min
1 parent 1e74a42 commit 68114ab

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

app/upgrades.go

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,26 @@ func (app *App) GanjaRevolution47_burn(_ upgradetypes.Plan) {
3636
}
3737
logger.Info(fmt.Sprintf("post migrate version map: %v", versionMap))
3838

39-
// Inflation control mechanism - TBD
40-
// // Get the current params from Mint module
41-
// mintParams := app.MintKeeper.GetParams(ctx)
42-
43-
// // Log the params BEFORE apply the new values
44-
// logger.Info(fmt.Sprintf("Current values for Mint value: InflationMax: %s, InflationMin: %s, InflationRateChange: %s",
45-
// mintParams.InflationMax.String(), mintParams.InflationMin.String(), mintParams.InflationRateChange.String()))
46-
47-
// // Reduce to half the value of inflation_max, inflation_min and inflation_rate_change
48-
// mintParams.InflationMax = mintParams.InflationMax.Quo(sdk.NewDec(2))
49-
// mintParams.InflationMin = mintParams.InflationMin.Quo(sdk.NewDec(2))
50-
// mintParams.InflationRateChange = mintParams.InflationRateChange.Quo(sdk.NewDec(2))
51-
52-
// // Set the new values at Mint module
53-
// if err := app.MintKeeper.SetParams(ctx, mintParams); err != nil {
54-
// return nil, err
55-
// }
56-
57-
// // Log the values after apply the changes
58-
// logger.Info(fmt.Sprintf("New values for Mint value: InflationMax: %s, InflationMin: %s, InflationRateChange: %s",
59-
// mintParams.InflationMax.String(), mintParams.InflationMin.String(), mintParams.InflationRateChange.String()))
39+
// Inflation control mechanism
40+
// Get the current params from Mint module
41+
mintParams := app.MintKeeper.GetParams(ctx)
42+
43+
// Log the params BEFORE apply the new values
44+
logger.Info(fmt.Sprintf("Current values for Mint value: InflationMax: %s, InflationMin: %s",
45+
mintParams.InflationMax.String(), mintParams.InflationMin.String()))
46+
47+
// Set fixed values for InflationMax and InflationMin
48+
mintParams.InflationMin = sdk.NewDec(0) // 0%
49+
mintParams.InflationMax = sdk.NewDecWithPrec(7, 2) // 7%
50+
51+
// Set the new values at Mint module
52+
if err := app.MintKeeper.SetParams(ctx, mintParams); err != nil {
53+
return nil, err
54+
}
55+
56+
// Log the values after apply the changes
57+
logger.Info(fmt.Sprintf("New values for Mint value: InflationMax: %s, InflationMin: %s",
58+
mintParams.InflationMax.String(), mintParams.InflationMin.String()))
6059

6160
return versionMap, err
6261
// return app.mm.RunMigrations(ctx, app.configurator, fromVM)

0 commit comments

Comments
 (0)