Contract Overview

# L1 contracts

# L2OutputOracle

The L2OutputOracle contract (opens new window) contains the state root of the Optimism blockchain (OP Mainnet, OP Goerli, etc.). Once fault proofs are activated, it will be the one that receives the result of the fault proof process.

This is the contract that replaces the old State Commitment Chain.

# OptimismPortal

The OptimismPortal contract (opens new window) provides the low-level API for communications between layers. Unless you are trying to send L2 transactions via L1 to bypass the sequencer, we strongly recommend sending messages between L1 and L2 via the L1CrossDomainMessenger and L2CrossDomainMessenger.

# L1CrossDomainMessenger

The L1CrossDomainMessenger contract (opens new window) is used for sending messages between the underlying L1 (Ethereum, Goerli, etc.) and L2 (OP Mainnet, OP Goerli, etc.). Those messages may or may not have assets attached to them.

# L1StandardBridge

The L1StandardBridge contract (opens new window) uses L1CrossDomainMessenger to transfer ETH and ERC-20 tokens between the underlying L1 (Ethereum, Goerli, etc.) and L2 (OP Mainnet, OP Goerli, etc.).

# L2 contracts (predeploys)

# L1Block

The L1Block contract (opens new window) sits at address 0x4200000000000000000000000000000000000015. You can use the getter functions (opens new window) to get these parameters:

  • number: The latest L1 block number known to L2 (the L1BlockNumber contract is still supported to avoid breaking existing applications)
  • timestamp: The timestamp of the latest L1 block
  • basefee: The base fee of the latest L1 block
  • hash: The hash of the latest L1 block
  • sequenceNumber: The number of the L2 block within the epoch (the epoch changes when there is a new L1 block)

Currently the L1 information is delayed by two block confirmations (~24 seconds) to minimize the impact of reorgs.

# SequencerFeeVault

The SequencerFeeVault contract (opens new window) handles funding the sequencer on L1 using the ETH base fee on L2.

The fees are calculated using EIP 1559 (opens new window), the same mechanism that Ethereum uses (but with different parameter values).

# L2ToL1MessagePasser

The L2ToL1MessagePasser contract (opens new window) is used internally by L2CrossDomainMessenger to initiate withdrawals.

Note that there are two contracts under this name:

# L2CrossDomainMessenger

The L2CrossDomainMessenger contract (opens new window) is used to send messages from L2 (OP Mainnet, OP Goerli, etc.) to the underlying L1 (Ethereum, Goerli, etc.).

# L2StandardBridge

The L2StandardBridge contract (opens new window) is used to "attach" assets (ETH and ERC-20 tokens) to messages that are then sent by L2CrossDomainMessenger.


The WETH9 contract (opens new window) is an ERC-20 token that wraps around ETH to provide extra functionality, such as approvals.

# Legacy Contracts

Those are contracts that have been superceded, but are kept in case any deployed contract depends on them.