Skip to content

Commit

Permalink
update evm params
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq committed Apr 9, 2024
1 parent c64626f commit 0d71015
Showing 1 changed file with 11 additions and 0 deletions.
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 0d71015

Please sign in to comment.