Commit 7cf0fb76 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4133 from ethereum-optimism/fix/safe-params

op-chain-ops: safety with params
parents f6cdc1d9 db022ddf
package ether
import (
"fmt"
"math/big"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
......@@ -40,6 +41,10 @@ func MigrateLegacyETH(db ethdb.Database, addresses []common.Address, allowances
storageSlotsToMigrate := make(map[common.Hash]int)
// Chain params to use for integrity checking.
params := ParamsByChainID[chainID]
if params == nil {
return common.Hash{}, fmt.Errorf("no chain params for %d", chainID)
}
log.Info("Chain params", "chain-id", chainID, "supply-delta", params.ExpectedSupplyDelta)
// Iterate over each address list, and read the addresses they
// contain into memory. Also calculate the storage slots for each
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment