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

refactor: update evm params #2924

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -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 params.
* (IRISMod) [\#385](https://github.com/irisnet/irismod/pull/385) Bump cosmos-sdk to v0.47.9-ics-lsm.
dreamer-zq marked this conversation as resolved.
Show resolved Hide resolved
dreamer-zq marked this conversation as resolved.
Show resolved Hide resolved

## 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)
}
Loading