Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: init gov MinDepositRatio params #2928

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* (IRISHub) [\#2918](https://github.com/irisnet/irishub/pull/2918) Adjusting the parameters of the ica module.
* (IRISHub) [\#2919](https://github.com/irisnet/irishub/pull/2919) Adjusting gov config.
* (IRISHub) [\#2924](https://github.com/irisnet/irishub/pull/2924) Update evm `AllowUnprotectedTxs` params.
* (IRISHub) [\#2928](https://github.com/irisnet/irishub/pull/2928) Initialize gov `MinDepositRatio` params.
dreamer-zq marked this conversation as resolved.
Show resolved Hide resolved
* (IRISMod) [\#385](https://github.com/irisnet/irismod/pull/385) Bump cosmos-sdk to v0.47.9-ics-lsm.

## 2.1.0
Expand Down
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{"*"}
)
12 changes: 12 additions & 0 deletions app/upgrades/v300/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func upgradeHandlerConstructor(
if err := mergeToken(ctx, box); err != nil {
return nil, err
}

if err := mergeGov(ctx, box); err != nil {
return nil, err
}
// initialize ICS27 module
initICAModule(ctx, m, fromVM)

Expand Down Expand Up @@ -84,3 +88,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)
}
dreamer-zq marked this conversation as resolved.
Show resolved Hide resolved
Loading