Skip to content

Commit bbe5be2

Browse files
committed
init gov MinDepositRatio params
1 parent 68c2f91 commit bbe5be2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

app/upgrades/v300/constants.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ var (
1919
// BeaconContractAddress is the address of the beacon contract
2020
BeaconContractAddress = ""
2121

22+
// MinDepositRatio is the minimum deposit ratio
23+
MinDepositRatio = sdk.MustNewDecFromStr("0.01")
24+
2225
allowMessages = []string{"*"}
2326
)

app/upgrades/v300/upgrades.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,11 @@ func mergeToken(ctx sdk.Context, box upgrades.Toolbox) error {
8484
params.Beacon = BeaconContractAddress
8585
return box.TokenKeeper.SetParams(ctx, params)
8686
}
87+
88+
func mergeGov(ctx sdk.Context, box upgrades.Toolbox) error {
89+
ctx.Logger().Info("start to run gov module migrations...")
90+
91+
params := box.GovKeeper.GetParams(ctx)
92+
params.MinDepositRatio = MinDepositRatio.String()
93+
return box.GovKeeper.SetParams(ctx, params)
94+
}

0 commit comments

Comments
 (0)