Skip to content

Commit

Permalink
init gov MinDepositRatio params
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq committed Apr 26, 2024
1 parent 68c2f91 commit bbe5be2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/upgrades/v300/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ var (
// BeaconContractAddress is the address of the beacon contract
BeaconContractAddress = ""

// MinDepositRatio is the minimum deposit ratio
MinDepositRatio = sdk.MustNewDecFromStr("0.01")

allowMessages = []string{"*"}
)
8 changes: 8 additions & 0 deletions app/upgrades/v300/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ func mergeToken(ctx sdk.Context, box upgrades.Toolbox) error {
params.Beacon = BeaconContractAddress
return box.TokenKeeper.SetParams(ctx, params)
}

func mergeGov(ctx sdk.Context, box upgrades.Toolbox) error {
ctx.Logger().Info("start to run gov module migrations...")

params := box.GovKeeper.GetParams(ctx)
params.MinDepositRatio = MinDepositRatio.String()
return box.GovKeeper.SetParams(ctx, params)
}

0 comments on commit bbe5be2

Please sign in to comment.