diff --git a/pages/builders/chain-operators/deploy/overview.mdx b/pages/builders/chain-operators/deploy/overview.mdx index 6ed147dc0..d5f3f004c 100644 --- a/pages/builders/chain-operators/deploy/overview.mdx +++ b/pages/builders/chain-operators/deploy/overview.mdx @@ -24,7 +24,7 @@ contracts that are deployed when the chain is created. Standard OP Stack chains should only use governance approved and audited smart contracts. The monorepo has them tagged with the following pattern `op-contracts/vX.X.X` and you can review the release notes for details on the - changes. Read more about the details on our [Smart Contract Release Section](/stack/protocol/rollup/smart-contracts#releases). + changes. Read more about the details on our [Smart Contract Release Section](/stack/smart-contracts#official-releases). ## Sequencer Node diff --git a/pages/builders/chain-operators/self-hosted.mdx b/pages/builders/chain-operators/self-hosted.mdx index 4ef78fd33..200eb7f4b 100644 --- a/pages/builders/chain-operators/self-hosted.mdx +++ b/pages/builders/chain-operators/self-hosted.mdx @@ -20,7 +20,12 @@ There are two main steps to get started building your own self-hosted OP Chain: To work with OP Chains, you'll need to understand the fundamental components of OP Chains. * **Chain Architecture**: OP Chains use execution and consensus clients as well as the OP Stack's privileged roles. For more details, see the [Chain Architecture](/builders/chain-operators/architecture) guide. - * **Smart Contracts**: OP Chains use several smart contracts on the L1 blockchain to manage aspects of the Rollup. Each OP Stack chain has its own set of [L1 smart contracts](/stack/protocol/rollup/smart-contracts#l1-contracts) and [L2 contracts or predeploys](/stack/protocol/rollup/smart-contracts#l2-contracts-predeploys) that are deployed when the chain is created. + * **Smart Contracts**: OP Chains use several smart contracts on the L1 + blockchain to manage aspects of the Rollup. Each OP Stack chain has its own + set of [L1 smart contracts](/stack/smart-contracts#layer-1-contracts), + [L2 predeploy contracts](/stack/smart-contracts#layer-2-contracts-predeploys), + and [L2 preinstall contracts](/builders/chain-operators/features/preinstalls). + that are deployed when the chain is created. * **Preinstalls**: OP Chains come with [preinstalled core contracts](/builders/chain-operators/features/preinstalls), making them usable as soon as a chain is initialized on the OP Stack. diff --git a/pages/chain/addresses.mdx b/pages/chain/addresses.mdx index e0142fce3..5b30eb9b4 100644 --- a/pages/chain/addresses.mdx +++ b/pages/chain/addresses.mdx @@ -11,7 +11,7 @@ import { L2ContractTable } from '@/components/L2ContractTable' # Contract Addresses This reference guide lists all the contract addresses for Mainnet and Testnet, as found on the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry/tree/main). -See the [Smart Contracts Overview](/stack/protocol/rollup/smart-contracts) for high-level details and access to the source code. +See the [Smart Contracts Overview](/stack/smart-contracts) for high-level details and access to the source code. This page is automatically generated from packages in the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry/tree/main) which keeps the content synched and up-to-date. diff --git a/pages/connect/contribute/style-guide.mdx b/pages/connect/contribute/style-guide.mdx index c9c38067b..0c058bd9c 100644 --- a/pages/connect/contribute/style-guide.mdx +++ b/pages/connect/contribute/style-guide.mdx @@ -320,7 +320,7 @@ Content types help manage technical content by defining the purpose and common s | Document type | Purpose | Examples | | ------------------ | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- | -| Overviews | General introduction to a product or feature, provides a happy-path for readers | [Smart Contract Overview](/stack/protocol/rollup/smart-contracts) | +| Overviews | General introduction to a product or feature, provides a happy-path for readers | [Smart Contract Overview](/stack/smart-contracts) | | Guides | Explain what things are and how they work | [Standard Bridge Guide](/builders/app-developers/bridging/standard-bridge) | | Quick Start Guides | Briefly explain how to "minimally" get started with a product, often in 30 minutes or less | [Superchain App Quick Start](/builders/app-developers/quick-start) | | Tutorials | Provide task-oriented guidance with step-by-step "learn by doing" instructions | [Bridging ERC-20 tokens with the Optimism SDK](/builders/app-developers/tutorials/cross-dom-bridge-erc20) | diff --git a/pages/stack/_meta.json b/pages/stack/_meta.json index 98eefb94c..917de8768 100644 --- a/pages/stack/_meta.json +++ b/pages/stack/_meta.json @@ -2,6 +2,7 @@ "getting-started": "Getting Started: OP Stack", "differences": "Differences Between Ethereum and OP Stack Chains", "components": "OP Stack Components", + "smart-contracts": "Smart Contracts", "explainer": "Superchain Explainer", "design-principles": "Design Philosophy & Principles", "protocol": "Protocol", diff --git a/pages/stack/protocol/rollup/_meta.json b/pages/stack/protocol/rollup/_meta.json index fef6a1bd1..0e5361de9 100644 --- a/pages/stack/protocol/rollup/_meta.json +++ b/pages/stack/protocol/rollup/_meta.json @@ -1,6 +1,5 @@ { "overview": "Rollup Overview", - "smart-contracts": "Smart Contracts", "deposit-flow": "Deposit Flow", "transaction-flow": "Transaction Flow", "withdrawal-flow": "Withdrawal Flow" diff --git a/pages/stack/protocol/rollup/smart-contracts.mdx b/pages/stack/protocol/rollup/smart-contracts.mdx deleted file mode 100644 index a3af040ae..000000000 --- a/pages/stack/protocol/rollup/smart-contracts.mdx +++ /dev/null @@ -1,287 +0,0 @@ ---- -title: Smart Contract Overview -lang: en-US -description: Learn how smart contracts work at a high level. ---- - -import { Callout } from 'nextra/components' - -# Smart Contract Overview - -This guide provides an overview of the functionality of the smart contract components. You can also find [contract addresses](/chain/addresses) on OP Mainnet. - -## L1 contracts - -### [DelayedVetoable](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/DelayedVetoable.sol) - -This contract enables a delay before a call is forwarded to a target contract, -and during the delay period the call can be vetoed by the authorized vetoer. -This contract does not support value transfers, only data is forwarded. -Additionally, this contract cannot be used to forward calls with data beginning -with the function selector of the `queuedAt(bytes32)` function. This is because -of input validation checks performed by Solidity at runtime on functions -which take an argument. - -### [L1CrossDomainMessenger](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol) - -The L1CrossDomainMessenger is a message passing interface between L1 and L2 -responsible for sending and receiving data on the L1 side. Users are encouraged -to use this interface instead of interacting with lower-level contracts directly. - -### [L1ERC721Bridge](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1ERC721Bridge.sol) - -The `L1ERC721bridge` is a contract which works together with the L2 ERC721 bridge -to make it possible to transfer ERC721 tokens from Ethereum to Optimism. This -contract acts as an escrow for ERC721 tokens deposited into L2. - -### [L1StandardBridge](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1StandardBridge.sol) - - - This contract is not intended to support all variations of ERC20 tokens. Examples - of some token types that may not be properly supported by this contract include, but are - not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists. - - -The `L1StandardBridge` is responsible for transferring ETH and ERC20 tokens between L1 and -L2. In the case that an ERC20 token is native to L1, it will be escrowed within this -contract. If the ERC20 token is native to L2, it will be burnt. Before Bedrock, ETH was -stored within this contract. After Bedrock, ETH is instead stored inside the -OptimismPortal contract. - -### [L2OutputOracle](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L2OutputOracle.sol) - -The `L2OutputOracle` contains an array of L2 state outputs, where each output is a -commitment to the state of the L2 chain. Other contracts like the `OptimismPortal` use -these outputs to verify information about the state of L2. - -### [OptimismPortal](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/OptimismPortal.sol) - -The `OptimismPortal` is a low-level contract responsible for passing messages between L1 -and L2. Messages sent directly to the `OptimismPortal` have no form of replayability. -Users are encouraged to use the `L1CrossDomainMessenger` for a higher-level interface. - -### [ProtocolVersions](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/ProtocolVersions.sol) - -The `ProtocolVersions` contract is used to manage Superchain protocol version information. - -### [ResourceMetering](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/ResourceMetering.sol) - -`ResourceMetering` implements an EIP-1559 style resource metering system where pricing -updates automatically based on current demand. - -### [SuperchainConfig](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/SuperchainConfig.sol) - -The `SuperchainConfig` contract is used to manage configuration of global Superchain values. - -### [SystemConfig](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/SystemConfig.sol) - -The `SystemConfig` contract is used to manage configuration of an OP Stack network. -All configuration is stored on L1 and picked up by L2 as part of the derivation of -the L2 chain. - -## L2 contracts (predeploys) - -### [BaseFeeVault](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/BaseFeeVault.sol) - -The `BaseFeeVault` accumulates the base fee that is paid by transactions. - -### [GasPriceOracle](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/GasPriceOracle.sol) - -This contract maintains the variables responsible for computing the L1 portion of the -total fee charged on L2. Before Bedrock, this contract held variables in state that were -read during the state transition function to compute the L1 portion of the transaction -fee. After Bedrock, this contract now simply proxies the L1Block contract, which has -the values used to compute the L1 portion of the fee in its state. - -The contract exposes an API that is useful for knowing how large the L1 portion of the -transaction fee will be. The following events were deprecated with Bedrock: - -* event OverheadUpdated(uint256 overhead); -* event ScalarUpdated(uint256 scalar); -* event DecimalsUpdated(uint256 decimals); - -### [L1Block](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/L1Block.sol) - -The `L1Block` predeploy gives users access to information about the last known L1 block. -Values within this contract are updated once per epoch (every L1 block) and can only be -set by the "depositor" account, a special system address. Depositor account transactions -are created by the protocol whenever we move to a new epoch. - -### [L1FeeVault](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/L1FeeVault.sol) - -The `L1FeeVault` accumulates the L1 portion of the transaction fees. - -### [L2CrossDomainMessenger](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/L2CrossDomainMessenger.sol) - -The `L2CrossDomainMessenger` is a high-level interface for message passing between L1 and -L2 on the L2 side. Users are generally encouraged to use this contract instead of lower -level message passing contracts. - -### [L2ERC721Bridge](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/L2ERC721Bridge.sol) - - - Do not bridge an ERC721 that was originally deployed on Optimism. This - bridge ONLY supports ERC721s originally deployed on Ethereum. Users will need to - wait for the one-week challenge period to elapse before their Optimism-native NFT - can be refunded on L2. - - -The `L2ERC721Bridge` is a contract which works together with the L1 ERC721 bridge to -make it possible to transfer ERC721 tokens from Ethereum to Optimism. This contract -acts as a minter for new tokens when it hears about deposits into the L1 ERC721 bridge. -This contract also acts as a burner for tokens being withdrawn. - -### [L2StandardBridge](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/L2StandardBridge.sol) - - - This contract is not intended to support all variations of ERC20 tokens. Examples - of some token types that may not be properly supported by this contract include, but are - not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists. - - -The `L2StandardBridge` is responsible for transferring ETH and ERC20 tokens between L1 and -L2. In the case that an ERC20 token is native to L2, it will be escrowed within this -contract. If the ERC20 token is native to L1, it will be burnt. - -### [L2ToL1MessagePasser](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/L2ToL1MessagePasser.sol) - - - There is a legacy contract under this same name. - - -The `L2ToL1MessagePasser` is a dedicated contract where messages that are being sent from -L2 to L1 can be stored. The storage root of this contract is pulled up to the top level -of the L2 output to reduce the cost of proving the existence of sent messages. - -### [SequencerFeeVault](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L2/SequencerFeeVault.sol) - -The SequencerFeeVault is the contract that holds any fees paid to the Sequencer during -transaction processing and block production. - -## Legacy Contracts - -These are legacy contracts from the old version of the OP Stack. - -### [AddressManager](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/AddressManager.sol) - -`AddressManager` is a legacy contract that was used in the old version of the -Optimism system to manage a registry of string names to addresses. We now use -a more standard proxy system instead, but this contract is still necessary for -backwards compatibility with several older contracts. - -### [DeployerWhitelist](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/DeployerWhitelist.sol) - -`DeployerWhitelist` is a legacy contract that was originally used to act as a -whitelist of addresses allowed to the Optimism network. The `DeployerWhitelist` -has since been disabled, but the code is kept in state for the sake of full -backwards compatibility. As of the Bedrock upgrade, the `DeployerWhitelist` is -completely unused by the Optimism system and could, in theory, be removed entirely. - -### [L1BlockNumber](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/L1BlockNumber.sol) - -`L1BlockNumber` is a legacy contract that fills the roll of the `OVM_L1BlockNumber` -contract in the old version of the Optimism system. Only necessary for backwards -compatibility. If you want to access the L1 block number going forward, you should -use the `L1Block` contract instead. - -### [L1ChugSplashProxy](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/L1ChugSplashProxy.sol) - -Basic ChugSplash proxy contract for L1. Very close to being a normal proxy but -has added functions `setCode` and `setStorage` for changing the code or storage -of the contract. Note for future developers: do NOT make anything in this -contract 'public' unless you know what you're doing. Anything public can -potentially have a function signature that conflicts with a signature attached -to the implementation contract. Public functions SHOULD always have the -`proxyCallIfNotOwner` modifier unless there's some *really* good reason not to -have that modifier. And there almost certainly is not a good reason to not have -that modifier. Beware! - -### [LegacyERC20ETH](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/LegacyERC20ETH.sol) - -`LegacyERC20ETH` is a legacy contract that held ETH balances before the Bedrock -upgrade. All ETH balances held within this contract were migrated to the state -trie as part of the Bedrock upgrade. Functions within this contract that mutate -state were already disabled as part of the EVM equivalence upgrade. - -### [LegacyMessagePasser](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/LegacyMessagePasser.sol) - -The `LegacyMessagePasser` was the low-level mechanism used to send messages from -L2 to L1 before the Bedrock upgrade. It is now deprecated in favor of the new -`MessagePasser`. - -### [LegacyMintableERC20](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/LegacyMintableERC20.sol) - -The legacy implementation of the `OptimismMintableERC20`. This contract is -deprecated and should no longer be used. - -### [ResolvedDelegateProxy](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/ResolvedDelegateProxy.sol) - -`ResolvedDelegateProxy` is a legacy proxy contract that makes use of the -`AddressManager` to resolve the implementation address. We're maintaining -this contract for backwards compatibility so we can manage all legacy -proxies where necessary. - -## Releases - -The full smart contract release process is documented in the [monorepo](https://github.com/ethereum-optimism/optimism?tab=readme-ov-file#development-and-release-process). -All production releases are always tags, versioned as `/v` -and contract releases you'll see them tagged as `op-contract/vX.X.X`. - - - For contract releases, refer to the GitHub release notes for a given release, - which will list the specific contracts being released—**not all contracts are - considered production ready within a release**, and many are under active - development. These release pages are linked below. - - Tags of the form `v`, such as `v1.1.4`, indicate releases of all Go code - only, and **DO NOT** include smart contracts. - - -### v1.0.0 - Bedrock - -The Bedrock protocol upgrade was designed to minimize the amount -of code in the OP Stack, pushed it as close as possible to Ethereum-Equivalence, -and most importantly making the stack modular. - -* [Bedrock release notes](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.0.0) ... -* [Governance post](https://gov.optimism.io/t/final-upgrade-1-bedrock-protocol-upgrade-v2/5548) - -### v1.1.0 - ProtocolVersions - -The Protocol Version documents the progression of the total set of canonical -OP Stack specifications. Components of the OP Stack implement the subset of -their respective protocol component domain, up to a given Protocol Version -of the OP Stack. - -The Protocol Version is NOT a hardfork identifier, but rather indicates -software-support for a well-defined set of features introduced in past and -future hardforks, not the activation of said hardforks. - - - The Protocol Version only applies to the Protocol specifications with the - [Superchain Targets](https://specs.optimism.io/protocol/superchain-upgrades.html#superchain-target) - specified within. This versioning is independent of the Semver versioning - used in OP Stack smart contracts, and the Semver-versioned reference software - of the OP-Stack. This is an optional feature. - - -* [ProtocolVersions release notes](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.1.0) - -### v1.2.0 - SuperchainConfig with Extended Pause Functionality - -The SuperchainConfig contract is used to manage global configuration values for -multiple OP Chains within a single Superchain network. - -* [SuperchainConfig and Extended Pause release notes](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.2.0) -* [Governance post](https://gov.optimism.io/t/upgrade-proposal-4/7534) - -### v1.3.0 - Multi-Chain Prep (MCP) - -This protocol upgrade strengthens the security and upgradeability of the -Superchain by enabling L1 contracts to be upgraded atomically across multiple -chains in a single transaction. This upgrade also extends the `SystemConfig` -to contain the addresses of the contracts in the network, allowing users to -discover the system's contract addresses programmatically. - -* [MCP release notes](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0-rc.1) -* [Governance post](https://gov.optimism.io/t/upgrade-proposal-6-multi-chain-prep-mcp-l1/7677) diff --git a/pages/stack/smart-contracts.mdx b/pages/stack/smart-contracts.mdx new file mode 100644 index 000000000..12e6bb175 --- /dev/null +++ b/pages/stack/smart-contracts.mdx @@ -0,0 +1,679 @@ +--- +title: Smart Contract Overview +lang: en-US +description: Learn about the smart contracts that make up the OP Stack. +--- + +import { Callout } from 'nextra/components' + +# Smart Contract Overview + +This guide provides an overview of the functionality of the smart contract components. You can also find [contract addresses](/chain/addresses) on OP Mainnet. + +## Layer 1 Contracts + +The layer 1 contracts of the OP Stack are deployed on Ethereum. Their primary +purpose is to facilitate the cross domain message passing and maintain the +valid state root of the layer 2. + +### Official Releases + +The full smart contract release process is documented in the [monorepo](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/VERSIONING.md). +All production releases are always tagged, versioned as `/v`. +Contract releases have a component name of `op-contracts` and therefore are tagged as `op-contract/vX.Y.Z`. + + + For contract releases, refer to the GitHub release notes for a given release, + which will list the specific contracts being released—**not all contracts are + considered production ready within a release**, and many are under active + development. These release pages are linked below. + + Releases or tags of the form `v` without a component name, such as `v1.1.4`, indicate releases of all Go code + only, and **DO NOT** include smart contracts. DO NOT use these releases for deploying + smart contracts—only deploy from `op-contracts/vX.Y.Z` + + +#### op-contracts/v1.5.0 - Safe Extensions + + + Note: While these are a governance approved contract release, the recommended + release for new production chains is `op-contracts/v1.3.0`. + + +The Safe Extensions protocol upgrade is intended to increase the security and +decentralization of the Superchain by: + +1. Increasing the Security Council Safe's signing threshold, from 4 to 10, out +of 13 owners. This meets the 75% threshold requirement for a Stage 1 rollup +outlined in [L2Beat's Stages framework](https://medium.com/l2beat/stages-update-security-council-requirements-4c79cea8ef52) +2. Reassigning the role of Guardian from the Foundation to a new Guardian Safe +with the Security Council Safe as its sole owner. This moves the Superchain +closer to satisfying the 1 week exit window 5 requirement for Stage 1. + * Additionally the Foundation is appointed to the new DeputyGuardian role + which is able to act as Guardian through the Guardian Safe. This + appointment can be revoked by the Security Council Safe at any time. +3. Reassigning the owner of the L2ProxyAdmin contract from the Foundation to +the Security Council. This ensures the Security Council Safe has a blocking +vote for L2 predeploy upgrades and is a requirement for Stage 1. + +* [Official - Safe Extensions Release](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.5.0) +* [Governance Post](https://gov.optimism.io/t/final-protocol-upgrade-8-guardian-security-council-threshold-and-l2-proxyadmin-ownership-changes-for-stage-1-decentralization/8157) + +
+ **Changelog** + **Added:** + + * LivenessGuard: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/9047beb54c66a5c572784efec8984f259302ec92/packages/contracts-bedrock/src/Safe/LivenessGuard.sol#L29) + * LivenessModule: [1.2.0](https://github.com/ethereum-optimism/optimism/blob/9047beb54c66a5c572784efec8984f259302ec92/packages/contracts-bedrock/src/Safe/LivenessModule.sol#L57) + * DeputyGuardianModule: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.5.0/packages/contracts-bedrock/src/Safe/SafeSigners.sol) + + **No change:** + + * AddressManager: [Latest (this has no version)](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/legacy/AddressManager.sol) + * L1CrossDomainMessenger: [2.3.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol#L24) + * L1ERC721Bridge: [2.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1ERC721Bridge.sol#L27) + * L1StandardBridge: [2.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1StandardBridge.sol#L73) + * OptimismMintableERC20Factory: [1.9.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol#L46) + * OptimismPortal: [3.10.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/L1/OptimismPortal2.sol#L144) + * SystemConfig: [2.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/L1/SystemConfig.sol#L111) + * FaultDisputeGame: [1.2.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L73) + * PermissionedDisputeGame: [1.2.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/PermissionedDisputeGame.sol) + * DisputeGameFactory: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/DisputeGameFactory.sol#L25) + * AnchorStateRegistry: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/AnchorStateRegistry.sol#L28) + * DelayedWETH: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/weth/DelayedWETH.sol#L25) + * MIPS: [1.0.1](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/cannon/MIPS.sol#L47) + * PreimageOracle: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/cannon/PreimageOracle.sol#L33) + * SuperchainConfig: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/SuperchainConfig.sol#L38) + * ProtocolVersions: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/ProtocolVersions.sol#L39) + +
+ +#### op-contracts/v1.4.0 - Fault Proofs + + + Note: While these are a governance approved contract release, the recommended + release for new production chains is `op-contracts/v1.3.0`. + + +This protocol upgrade reduces the trust assumptions for users of the OP Stack +by enabling permissionless output proposals and a permissionless fault proof +system. As part of a responsible and safe rollout of Fault Proofs, it preserves +the ability for the guardian to override if necessary to maintain security. + +As a result, withdrawals no longer depend on the privileged proposer role +posting an output root, allowing the entire withdrawal process to be completed +without any privileged actions. The trust assumption is reduced to requiring +only that the guardian role does not act to intervene. + +Combined with the Guardian, Security Council Threshold and L2 ProxyAdmin +Ownership changes 23 proposals, this satisfies the criteria to have OP Chains +reach Stage 1 status. + +* [Official - Fault Proof Release](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts/v1.4.0) +* [Governance Post](https://gov.optimism.io/t/final-protocol-upgrade-7-fault-proofs/8161) + +
+ **Changelog** + **Added:** + + * FaultDisputeGame: [1.2.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L73) + * PermissionedDisputeGame: [1.2.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/PermissionedDisputeGame.sol) + * DisputeGameFactory: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/DisputeGameFactory.sol#L25) + * AnchorStateRegistry: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/AnchorStateRegistry.sol#L28) + * DelayedWETH: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/dispute/weth/DelayedWETH.sol#L25) + * MIPS: [1.0.1](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/cannon/MIPS.sol#L47) + * PreimageOracle: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/cannon/PreimageOracle.sol#L33) + + **Upgraded:** + + * OptimismPortal: [3.10.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.4.0/packages/contracts-bedrock/src/L1/OptimismPortal2.sol#L144) + * SystemConfig: [2.2.0](https://github.com/ethereum-optimism/optimism/blob/547ea72d9849e13ce169fd31df0f9197651b3f86/packages/contracts-bedrock/src/L1/SystemConfig.sol#L111) + + **Deprecated:** + + * L2OutputOracle: 1.8.0 + + **No change:** + + * AddressManager: [Latest (this has no version)](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/legacy/AddressManager.sol) + * L1CrossDomainMessenger: [2.3.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol#L24) + * L1ERC721Bridge: [2.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1ERC721Bridge.sol#L27) + * L1StandardBridge: [2.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1StandardBridge.sol#L73) + * OptimismMintableERC20Factory: [1.9.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol#L46) + * SuperchainConfig: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/SuperchainConfig.sol#L38) + * ProtocolVersions: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/ProtocolVersions.sol#L39) +
+ +#### op-contracts/v1.3.0 - Multi-Chain Prep (MCP) + + + This is the current recommended contract release for new production chains. + + +This protocol upgrade strengthens the security and upgradeability of the +Superchain by enabling L1 contracts to be upgraded atomically across multiple +chains in a single transaction. This upgrade also extends the `SystemConfig` +to contain the addresses of the contracts in the network, allowing users to +discover the system's contract addresses programmatically. + +* [Official - MCP Release](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.3.0) +* [Governance Post](https://gov.optimism.io/t/upgrade-proposal-6-multi-chain-prep-mcp-l1/7677) + +
+ **Changelog** + + **Upgraded:** + + * OptimismPortal: [2.5.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/OptimismPortal.sol#L94) + * L1CrossDomainMessenger: [2.3.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol#L24) + * L1StandardBridge: [2.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1StandardBridge.sol#L73) + * L1ERC721Bridge: [2.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1ERC721Bridge.sol#L27) + * OptimismMintableERC20Factory: [1.9.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol#L46) + * L2OutputOracle: [1.8.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L2OutputOracle.sol#L59) + * SystemConfig: [1.12.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/SystemConfig.sol#L104) + + **No change:** + + * AddressManager: [Latest (this has no version)](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/legacy/AddressManager.sol) + * SuperchainConfig: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/SuperchainConfig.sol#L38) + * ProtocolVersions: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/ProtocolVersions.sol#L39) +
+ +#### op-contracts/v1.2.0 - SuperchainConfig with Extended Pause Functionality + +The SuperchainConfig contract is used to manage global configuration values for +multiple OP Chains within a single Superchain network. + +* [Official - SuperchainConfig and Extended Pause Release](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.2.0) +* [Governance post](https://gov.optimism.io/t/upgrade-proposal-4/7534) + +
+ **Changelog** + + **Added:** + + * SuperchainConfig: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/SuperchainConfig.sol#L38) + + **Upgraded:** + + * AddressManager: [Latest (this has no version)](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/legacy/AddressManager.sol) + * L1CrossDomainMessenger: [2.2.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol#L25) + * L1ERC721Bridge: [2.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/L1ERC721Bridge.sol#L26) + * L1StandardBridge: [2.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/L1StandardBridge.sol#L73) + * L2OutputOracle: [1.7.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/L2OutputOracle.sol#L63) + * OptimismMintableERC20Factory: [1.8.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/universal/OptimismMintableERC20Factory.sol#L35) + * OptimismPortal: [2.4.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/OptimismPortal.sol#L96) + * SystemConfig: [1.11.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/SystemConfig.sol#L67) + * ProtocolVersions: [1.0.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/L1/ProtocolVersions.sol#L39) + + **No change:** + + * AddressManager: Latest (this has no version) +
+ +#### op-contracts/v1.1.0 - ProtocolVersions + +The Protocol Version documents the progression of the total set of canonical +OP Stack specifications. Components of the OP Stack implement the subset of +their respective protocol component domain, up to a given Protocol Version +of the OP Stack. + +The Protocol Version is NOT a hardfork identifier, but rather indicates +software-support for a well-defined set of features introduced in past and +future hardforks, not the activation of said hardforks. + + + The Protocol Version only applies to the Protocol specifications with the + [Superchain Targets](https://specs.optimism.io/protocol/superchain-upgrades.html#superchain-target) + specified within. This versioning is independent of the Semver versioning + used in OP Stack smart contracts, and the Semver-versioned reference software + of the OP-Stack. This is an optional feature. + + +* [Official ProtocolVersions Release](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.1.0) + +
+ **Changelog** + + **Added:** + + * ProtocolVersions: 1.0.0 + + **No change:** + + * AddressManager: [Latest (this has no version)](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/legacy/AddressManager.sol) + * L1CrossDomainMessenger: [1.4.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/L1CrossDomainMessenger.sol#L23) + * L1ERC721Bridge: [1.1.1](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/L1ERC721Bridge.sol#L23) + * L1StandardBridge: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol#L94) + * L2OutputOracle: [1.3.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol#L81) + * OptimismMintableERC20Factory: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/universal/OptimismMintableERC20Factory.sol#L47) + * OptimismPortal: [1.6.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L143) + * SystemConfig: [1.3.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L83) +
+ +#### op-contracts/v1.0.0 - Bedrock + +The Bedrock protocol upgrade was designed to minimize the amount +of code in the OP Stack, pushes it as close as possible to Ethereum-Equivalence, +and most importantly making the stack modular. + +* [Official - Bedrock Release](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.0.0) ... +* [Governance post](https://gov.optimism.io/t/final-upgrade-1-bedrock-protocol-upgrade-v2/5548) + +
+ **Changelog** + + **Added:** + + * AddressManager: [Latest (this has no version)](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.2.0/packages/contracts-bedrock/src/legacy/AddressManager.sol) + * L1CrossDomainMessenger: [1.4.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/L1CrossDomainMessenger.sol#L23) + * L1ERC721Bridge: [1.1.1](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/L1ERC721Bridge.sol#L23) + * L1StandardBridge: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol#L94) + * L2OutputOracle: [1.3.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol#L81) + * OptimismMintableERC20Factory: [1.1.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/universal/OptimismMintableERC20Factory.sol#L47) + * OptimismPortal: [1.6.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L143) + * SystemConfig: [1.3.0](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.0.0/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L83) +
+ +### L1 Contract Details + +#### AddressManager + +`AddressManager` is a legacy contract that was used in the old version of the +Optimism system to manage a registry of string names to addresses. We now use a +more standard proxy system for most contracts, but this contract is still used for +the L1CrossDomainMessenger, via ResolvedDelegateProxy + +#### SuperchainConfig + +The `SuperchainConfig` contract is used to manage configuration of global +superchain values. It has the ability to pause and unpause all withdrawals +in the Superchain. + +#### L1CrossDomainMessenger + +The `L1CrossDomainMessenger` is a message passing interface between L1 and L2 +responsible for sending and receiving data on the L1 side. Users are encouraged +to use this interface instead of interacting with lower-level contracts directly. + +#### L1ERC721Bridge + +The `L1ERC721bridge` is a contract which works together with the `L2ERC721Bridge` +to make it possible to transfer ERC721 tokens from Ethereum to OP Mainnet. This +contract acts as an escrow for ERC721 tokens deposited into L2. + +#### L1StandardBridge + + + This contract is not intended to support all variations of ERC20 tokens. Examples + of some token types that may not be properly supported by this contract include, but are + not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists. + + +The `L1StandardBridge` is responsible for transferring ETH and ERC20 tokens between L1 and +L2. In the case that an ERC20 token is native to L1, it will be escrowed within this +contract. If the ERC20 token is native to L2, it will be burnt. + +#### OptimismPortal + +The `OptimismPortal` is a low-level contract responsible for passing messages between L1 +and L2. Messages sent directly to the `OptimismPortal` have no form of replayability. +Users are encouraged to use the `L1CrossDomainMessenger` for a higher-level interface. + +#### ProtocolVersions + +The `ProtocolVersions` contract is used to manage Superchain protocol version +information. It exposes a recommended and required version for node operators. +The recommended/required versions are changed with each hard fork. Nodes can +optionally halt if using the wrong version. + +#### SystemConfig + +The `SystemConfig` contract is helps manage configuration of an OP Stack +network. Much of the network's configuration is stored on L1 and picked up by +L2 as part of the derivation of the L2 chain. The contract also contains +references to all other contract addresses for the chain. + +#### DisputeGameFactory + +The `DisputeGameFactory` contract generates `FaultDisputeGame` contract +instances. + +#### FaultDisputeGame + +The `FaultDisputeGame` contract instances that each act as a host to a proposal +about the state of the OP Stack chain at a given block number. + +#### PermissionedDisputeGame + +The `Guardian` can also choose to revert to a `PermissionedDisputeGame` +contract that only allows specific roles to submit and challenge proposals. + +#### AnchorStateRegistry + +The `AnchorStateRegistry` is a contract that stores the latest "anchor" state +for each available `FaultDisputeGame` type. The anchor state is the latest +state that has been proposed on L1 and was not challenged within the challenge +period. By using stored anchor states, new `FaultDisputeGame` instances can +be initialized with a more recent starting state which reduces the amount of +required offchain computation. + +#### DelayedWETH + +The `DelayedWETH` contract has been set up to hold the bonds and only allow +payouts after a delay, so that bonds can be redirected towards the correct +recipient in the case that a game resolves incorrectly. + +#### MIPS + +The `MIPS` smart contract is an onchain implementation of a virtual machine +(VM) that encompasses the 32-bit, Big-Endian, MIPS III Instruction Set +Architecture (ISA). + +#### PreimageOracle + +The `PreimageOracle` contract for storing permissioned pre-images. + +#### DEPRECATED - L2OutputOracle + +The `L2OutputOracle` contains an array of L2 state outputs, where each output is a +commitment to the state of the L2 chain. Other contracts like the `OptimismPortal` use +these outputs to verify information about the state of L2. + +## Layer 2 Contracts (Predeploys) + +Predeployed smart contracts exist at predetermined addresses in the genesis +state. They are similar to precompiles but instead run directly in the EVM +instead of running native code outside the EVM. + +Predeploys are used instead of precompiles to make it easier for multiclient +implementations as well as allowing for more integration with hardhat/foundry +network forking. + +### WETH9 + +`WETH9` is the standard implementation of Wrapped Ether. It is a commonly used +contract and is placed as a predeploy so that it is at a deterministic address. + +* **Address:** `0x4200000000000000000000000000000000000006` +* **Introduced:** Legacy +* **Deprecated:** no +* **Proxied:** no + +### L2CrossDomainMessenger + +The `L2CrossDomainMessenger` is a high-level interface for message passing +between L1 and L2 on the L2 side. Users are generally encouraged to use this +contract instead of lower level message passing contracts. + +* **Address:** `0x4200000000000000000000000000000000000007` +* **Introduced:** Legacy +* **Deprecated:** no +* **Proxied:** yes + +### L2StandardBridge + + + This contract is not intended to support all variations of ERC20 tokens. Examples + of some token types that may not be properly supported by this contract include, but are + not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists. + + +The `L2StandardBridge` is responsible for transferring ETH and ERC20 tokens between L1 and +L2. In the case that an ERC20 token is native to L2, it will be escrowed within this +contract. If the ERC20 token is native to L1, it will be burnt. + +* **Address:** `0x4200000000000000000000000000000000000010` +* **Introduced:** Legacy +* **Deprecated:** no +* **Proxied:** yes + +### SequencerFeeVault + +The `SequencerFeeVault` is the contract that holds any fees paid to the +Sequencer during transaction processing and block production. + +* **Address:** `0x4200000000000000000000000000000000000011` +* **Introduced:** Legacy +* **Deprecated:** no +* **Proxied:** yes + +### OptimismMintableERC20Factory + +The `OptimismMintableERC20Factory` is responsible for creating ERC20 contracts +on L2 that can be used for depositing native L1 tokens into. These ERC20 +contracts can be created permissionlessly and implement the interface required +by the StandardBridge to just work with deposits and withdrawals. + +Each ERC20 contract that is created by the `OptimismMintableERC20Factory` +allows for the L2StandardBridge to mint and burn tokens, depending on if the +user is depositing from L1 to L2 or withdrawing from L2 to L1. + +* **Address:** `0x4200000000000000000000000000000000000012` +* **Introduced:** Legacy +* **Deprecated:** no +* **Proxied:** yes + +### GasPriceOracle + +In the legacy system, the `GasPriceOracle` was a permissioned contract that was +pushed the L1 base fee and the L2 gas price by an offchain actor. The offchain +actor observes the L1 blockheaders to get the L1 base fee as well as the gas +usage on L2 to compute what the L2 gas price should be based on a congestion +control algorithm. + +After Bedrock, the `GasPriceOracle` is no longer a permissioned contract and +only exists to preserve the API for offchain gas estimation. The function +`getL1Fee(bytes)` accepts an unsigned RLP transaction and will return the L1 +portion of the fee. This fee pays for using L1 as a data availability layer +and should be added to the L2 portion of the fee, which pays for execution, +to compute the total transaction fee. + +The values used to compute the L1 portion of the fee prior to the Ecotone +upgrade are: + +* `scalar` +* `overhead` +* `decimals` + +After the Bedrock upgrade, these values are instead managed by the +`SystemConfig` contract on L1. The scalar and overhead values are sent to the +`L1Block` contract each block, and the decimals value has been hardcoded to 6. + +Following the Ecotone upgrade, the values used for L1 fee computation are: + +* `baseFeeScalar` +* `blobBaseFeeScalar` +* `decimals` + +These new scalar values are managed by the `SystemConfig` contract on the L1 by +introducing a backwards compatible versioned encoding scheme of its scalars +storage slot. The decimals remain hardcoded to 6, and the overhead value is +ignored. + +* **Address:** `0x420000000000000000000000000000000000000F` +* **Introduced:** Legacy +* **Deprecated:** no +* **Proxied:** yes + +### GovernanceToken + +The OP token used in governance and supporting voting and delegation. +Implements EIP 2612 allowing signed approvals. Contract is "owned" by a +`MintManager` instance with permission to the `mint` function only, for the +purposes of enforcing the token inflation schedule. + +* **Address:** `0x4200000000000000000000000000000000000042` +* **Introduced:** Legacy +* **Deprecated:** no +* **Proxied:** no + +### L1Block + +The `L1Block` predeploy gives users access to information about the last known +L1 block. Values within this contract are updated once per epoch (every L1 +block) and can only be set by the "depositor" account, a special system +address. Depositor account transactions are created by the protocol whenever we +move to a new epoch. + +* **Address:** `0x4200000000000000000000000000000000000015` +* **Introduced:** Bedrock +* **Deprecated:** no +* **Proxied:** yes + +### L2ToL1MessagePasser + + + There is a legacy contract under this same name. + + +The `L2ToL1MessagePasser` is a dedicated contract where messages that are being +sent from L2 to L1 can be stored. The storage root of this contract is pulled +up to the top level of the L2 output to reduce the cost of proving the +existence of sent messages. + +* **Address:** `0x4200000000000000000000000000000000000016` +* **Introduced:** Bedrock +* **Deprecated:** no +* **Proxied:** yes + +### L2ERC721Bridge + + + Do not bridge an ERC721 that was originally deployed on Optimism. This + bridge ONLY supports ERC721s originally deployed on Ethereum. Users will need to + wait for the one-week challenge period to elapse before their Optimism-native NFT + can be refunded on L2. + + +The `L2ERC721Bridge` is a contract which works together with the L1 ERC721 bridge to +make it possible to transfer ERC721 tokens from Ethereum to Optimism. This contract +acts as a minter for new tokens when it hears about deposits into the L1 ERC721 bridge. +This contract also acts as a burner for tokens being withdrawn. + +* **Address:** `0x4200000000000000000000000000000000000014` +* **Introduced:** Legacy +* **Deprecated:** no +* **Proxied:** yes + +### OptimismMintableERC721Factory + +Factory contract for creating `OptimismMintableERC721` contracts. + +* **Address:** `0x4200000000000000000000000000000000000017` +* **Introduced:** Bedrock +* **Deprecated:** no +* **Proxied:** yes + +### ProxyAdmin + +The `ProxyAdmin` is the owner of all of the proxy contracts set at the +predeploys. It is itself behind a proxy. The owner of the `ProxyAdmin` will +have the ability to upgrade any of the other predeploy contracts. + +* **Address:** `0x4200000000000000000000000000000000000018` +* **Introduced:** Bedrock +* **Deprecated:** no +* **Proxied:** yes + +### BaseFeeVault + +The `BaseFeeVault` predeploy receives the base fees on L2. The base fee is not +burnt on L2 like it is on L1. Once the contract has received a certain amount +of fees, the ETH can be withdrawn to an immutable address on L1. + +* **Address:** `0x4200000000000000000000000000000000000019` +* **Introduced:** Bedrock +* **Deprecated:** no +* **Proxied:** yes + +### L1FeeVault + +The `L1FeeVault` predeploy receives the L1 portion of the transaction fees. +Once the contract has received a certain amount of fees, the ETH can be +withdrawn to an immutable address on L1. + +* **Address:** `0x420000000000000000000000000000000000001a` +* **Introduced:** Bedrock +* **Deprecated:** no +* **Proxied:** yes + +### SchemaRegistry + +The `SchemaRegistry` predeploy implements the global attestation schemas for +the Ethereum Attestation Service protocol. + +* **Address:** `0x4200000000000000000000000000000000000020` +* **Introduced:** Bedrock +* **Deprecated:** no +* **Proxied:** yes + +### EAS + +The `EAS` predeploy implements the Ethereum Attestation Service protocol. + +* **Address:** `0x4200000000000000000000000000000000000021` +* **Introduced:** Bedrock +* **Deprecated:** no +* **Proxied:** yes + +### BeaconBlockRoot + +The `BeaconBlockRoot` predeploy provides access to the L1 beacon block roots. +This was added during the Ecotone network upgrade and is specified in +[EIP-4788](https://eips.ethereum.org/EIPS/eip-4788). + +* **Address:** `0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02` +* **Introduced:** Ecotone +* **Deprecated:** no +* **Proxied:** no + +### DEPRECATED Contracts + + +#### DEPRECATED - LegacyMessagePasser + +The `LegacyMessagePasser` was the low-level mechanism used to send messages +from L2 to L1 before the Bedrock upgrade. + +* **Address:** `0x4200000000000000000000000000000000000000` +* **Introduced:** Legacy +* **Deprecated:** yes +* **Proxied:** yes + +#### DEPRECATED - DeployerWhitelist + +`DeployerWhitelist` is a legacy contract that was originally used to act as a +whitelist of addresses allowed to the Optimism network. The `DeployerWhitelist` +has since been disabled, but the code is kept in state for the sake of full +backwards compatibility. As of the Bedrock upgrade, the `DeployerWhitelist` is +completely unused by the Optimism system and could, in theory, be removed entirely. + +* **Address:** `0x4200000000000000000000000000000000000002` +* **Introduced:** Legacy +* **Deprecated:** yes +* **Proxied:** yes + +#### DEPRECATED - LegacyERC20ETH + +`LegacyERC20ETH` is a legacy contract that held ETH balances before the Bedrock +upgrade. All ETH balances held within this contract were migrated to the state +trie as part of the Bedrock upgrade. Functions within this contract that mutate +state were already disabled as part of the EVM equivalence upgrade. + +* **Address:** `0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000` +* **Introduced:** Legacy +* **Deprecated:** yes +* **Proxied:** yes + +#### DEPRECATED - L1BlockNumber + +`L1BlockNumber` is a legacy contract that fills the role of the +`OVM_L1BlockNumber` contract in the old version of the Optimism system. Only +necessary for backwards compatibility. If you want to access the L1 block +number going forward, you should use the `L1Block`contract instead. + +* **Address:** `0x4200000000000000000000000000000000000013` +* **Introduced:** Legacy +* **Deprecated:** yes +* **Proxied:** yes diff --git a/public/_redirects b/public/_redirects index 9f2d03506..89f0ac83c 100644 --- a/public/_redirects +++ b/public/_redirects @@ -79,3 +79,4 @@ /stack/protocol/fault-proofs/overview /stack/protocol/fault-proofs/explainer /builders/chain-operators/management/configuration /builders/chain-operators/configuration/overview /builders/chain-operators/management/custom-gas-token /builders/chain-operators/features/custom-gas-token +/stack/protocol/rollup/smart-contracts /stack/smart-contracts \ No newline at end of file diff --git a/words.txt b/words.txt index 5cdce093c..5b1acc254 100644 --- a/words.txt +++ b/words.txt @@ -25,6 +25,7 @@ BLOBPOOL blobpool blobspace blockhash +blockheaders blocklists BLOCKLOGS blocklogs @@ -192,6 +193,7 @@ MTHI MTLO MULT multiaddr +multiclient multisigs MULTU nethermind @@ -246,11 +248,13 @@ preconfigured predeploy Predeployed predeployed +Predeploys predeploys Preimage preimage PREIMAGES preimages +preinstall Preinstalls preinstalls Prestate @@ -263,6 +267,7 @@ pricelimit productionize productionized Protip +Proxied proxyd pseudorandomly QRNG @@ -345,7 +350,6 @@ unsubmitted UPNP VERKLE verkle -Vetoable VHOSTS vhosts Viem