Skip to content

Instantly share code, notes, and snippets.

@maurelian
Last active October 22, 2021 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maurelian/f7f00b19c6291f34a42abf22dbff6f46 to your computer and use it in GitHub Desktop.
Save maurelian/f7f00b19c6291f34a42abf22dbff6f46 to your computer and use it in GitHub Desktop.

List of key breaking changes to watch for:

  1. Unverified contracts:

    1. Contracts whose source code has not been verified on Etherscan (Kovan, Optimistic Ethereum) will be wiped out along with their storage.
  2. Contracts whose source code has been verified will be recompiled with the standard Solidity compiler. As a result of this:

    1. The EXTCODEHASH and CODESIZE of every contract will change.
    2. The address generated by CREATE2 may be different (it depends on Any hardcoded values will break. the constructor code).
    3. Code size will no longer be increased during compilation. Any custom OVM work that required reducing code size could now be reverted.
    4. Uniswap:
      1. pools will be moved to their L1-equivalent addresses corresponding to CREATE2 with the new bytecode.
      2. ERC20 tokens will be migrated to their new CREATE2'ed addresses.
  3. ETH will no longer be ERC20 compatible.

    1. If you need wrapped ETH we deployed a standard WETH9 contract at 0x4200000000000000000000000000000000000006.
    2. To withdraw ETH you call the withdraw function of L2StandardBridge with an L2 token address of 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000.
  4. EOAs will no longer be contract wallets

    • make no assumptions around EOAs having code or additional OVM-specific functionality.
  5. Gas usage

    1. will decrease to be the same as on L1 Ethereum.
  6. Certain opcodes will have updated functionality:

    1. NUMBER - block.number in L2 will now correspond to the L2 block number, not “Last finalized L1 block number” like it used to. Any project urrently using block.number must check that this will not break their mplementation. The L1 Block number will be made accessible via a new predeployed ontract.
    2. COINBASE is set by the sequencer. For the near-term future, it will return the OVM_SequencerFeeVault address (currently 0x4200000000000000000000000000000000000011`)
    3. DIFFICULTY will return 0
    4. BLOCKHASH will return the L2 block hash. Note that this value can be manipulated by the sequencer and is not a safe source of randomness.
    5. SELFDESTRUCT will now work just as it currently works in the EVM.
    6. GASPRICE will now return the l2GasPrice
    7. BASEFEE will be unsupported - execution will revert if it is used.
    8. ORIGIN will be supported normally.
    9. (TIMESTAMP will function the same as before)
  7. OVM System contracts

    1. Do not depend on OVM system contracts. We will remove:
      1. OVM_ExecutionManager
      2. OVM_SequencerEntrypoint
      3. OVM_StateManager
      4. OVM_StateManagerFactory
      5. OVM_SafetyChecker
      6. OVM_ECDSAContractAccount
      7. OVM_ExecutionManagerWrapper
      8. Lib_AddressManager
      9. (All other OVM predeploys will remain at the same addresses as before the regenesis)
  8. History

    • all historical transactions and logs will be inaccessible from the new chain, and the new chain will start from Block #0. The old chain data will not be accessible except under extreme circumstances. Applications like Dune Analytics, Tenderly, Etherscan, and the Graph will not support access to transactions or logs from before the regenesis.

Javascript Code

  1. Until OVM 2.0 is officially released, the OVM 2.0 packages are tagged as canary, here is an example package.json file.
  2. Contract names no longer start with OVM_ and their directory location changed.
  3. Because we no longer have an address manager on L2, the way to get the address of L1CrossDomainMessenger is to start from the L2CrossDomainMessenger contract:
  4. There is no longer an artifacts-ovm directory. The OVM 2.0 artifacts are the same as the artifacts you use for L1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment