Skip to content

Commit

Permalink
Merge pull request #2924 from irisnet/update-evm-params
Browse files Browse the repository at this point in the history
refactor: update evm params
  • Loading branch information
mitch1024 authored Apr 10, 2024
2 parents c64626f + 198320b commit 04bc996
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* (IRISHub) [\#2914](https://github.com/irisnet/irishub/pull/2914) Improve unit test.
* (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.
* (IRISMod) [\#385](https://github.com/irisnet/irismod/pull/385) Bump cosmos-sdk to v0.47.9-ics-lsm.

## 2.1.0
Expand Down
11 changes: 11 additions & 0 deletions app/upgrades/v300/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ func upgradeHandlerConstructor(
box upgrades.Toolbox,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
if err := mergeEVM(ctx, box); err != nil {
return nil, err
}
// initialize ICS27 module
initICAModule(ctx, m, fromVM)

Expand Down Expand Up @@ -60,3 +63,11 @@ func mergeLSModule(ctx sdk.Context, box upgrades.Toolbox) error {
storeKey := box.GetKey(stakingtypes.StoreKey)
return migrateStore(ctx, storeKey, box.AppCodec, box.StakingKeeper)
}

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

params := box.EvmKeeper.GetParams(ctx)
params.AllowUnprotectedTxs = true
return box.EvmKeeper.SetParams(ctx, params)
}

0 comments on commit 04bc996

Please sign in to comment.