Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
AdriaCarrera committed Apr 25, 2024
2 parents 82b189d + f7ae8e8 commit 5b5b282
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions app/upgrades/v2/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,29 +91,9 @@ func CreateUpgradeHandler(
if _, err := ibctmmigrations.PruneExpiredConsensusStates(ctx, cdc, clientKeeper); err != nil {
return nil, err
}
// !! ATTENTION !!

// Add EIP contained in Shanghai hard fork to the extra EIPs
// in the EVM parameters. This enables using the PUSH0 opcode and
// thus supports Solidity v0.8.20.
//
// NOTE: this was already enabled on testnet
logger.Info("adding EIP 3855 to EVM parameters")
err := EnableEIPs(ctx, ek, 3855)
if err != nil {
logger.Error("error while enabling EIPs", "error", err)
}

// Leave modules are as-is to avoid running InitGenesis.
logger.Debug("running module migrations ...")
return mm.RunMigrations(ctx, configurator, vm)
}
}

// EnableEIPs enables the given EIPs in the EVM parameters.
func EnableEIPs(ctx sdk.Context, ek *evmkeeper.Keeper, eips ...int64) error {
evmParams := ek.GetParams(ctx)
evmParams.ExtraEIPs = append(evmParams.ExtraEIPs, eips...)

return ek.SetParams(ctx, evmParams)
}

0 comments on commit 5b5b282

Please sign in to comment.