diff --git a/CHANGELOG.md b/CHANGELOG.md index cb45604ea..dbf2c4407 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/app/upgrades/v300/upgrades.go b/app/upgrades/v300/upgrades.go index 6659f048f..736542743 100644 --- a/app/upgrades/v300/upgrades.go +++ b/app/upgrades/v300/upgrades.go @@ -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) @@ -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) +}