-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: Add L2CM implementation #19111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
maurelian
merged 16 commits into
ethereum-optimism:develop
from
defi-wonderland:sc-feat/l2cm-impl-l2contractsmanager
Feb 25, 2026
+2,249
−2
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
774384e
feat: l2cm impl l2contractsmanager (#837)
0xiamflux 63279b9
refactor: l2cm address comments (#839)
0xiamflux eb28cf3
chore: pr ready (#844)
0xiamflux 31ebe78
refactor: moves util functions out of L2CM implementation (#848)
0xiamflux e5eb8b9
feat: l2cm address comments (#850)
0xiamflux f0158e3
feat: conditionally skip some predeploys based on them being supporte…
0xiamflux c08109a
fix: l2cm address comments (#872)
0xiamflux add2a2b
test: L2CM verify testing (#874)
0xiamflux 9da8ff3
chore: sync with develop
0xiamflux ca549b6
chore: just pr ready
0xiamflux e09ceba
Merge pull request #875 from defi-wonderland/sync/l2cm-sync
0xiamflux e29de96
chore: L2CM round comments (#877)
0xiamflux d4812bb
chore: l2cm round comments2 (#883)
0xiamflux 523d3af
chore: remove unused function in tests (#884)
0xiamflux a064480
refactor: l2cm group impls (#885)
0xiamflux ed617ef
test: add OZ v5 Initializable compatibility in L2ContractsManagerUtil…
0xiamflux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 32 additions & 1 deletion
33
packages/contracts-bedrock/interfaces/L2/IL2ContractsManager.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,41 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| // Interfaces | ||
| import { ISemver } from "interfaces/universal/ISemver.sol"; | ||
|
|
||
| // Libraries | ||
| import { L2ContractsManagerTypes } from "src/libraries/L2ContractsManagerTypes.sol"; | ||
|
|
||
| /// @title IL2ContractsManager | ||
| /// @notice Interface for the L2ContractsManager contract. | ||
| interface IL2ContractsManager { | ||
| interface IL2ContractsManager is ISemver { | ||
| /// @notice Thrown when the upgrade function is called outside of a DELEGATECALL context. | ||
| error L2ContractsManager_OnlyDelegatecall(); | ||
|
|
||
| /// @notice Thrown when a user attempts to downgrade a contract. | ||
| /// @param _target The address of the contract that was attempted to be downgraded. | ||
| error L2ContractsManager_DowngradeNotAllowed(address _target); | ||
|
|
||
| /// @notice Error thrown when a semver string has less than 3 parts. | ||
| error SemverComp_InvalidSemverParts(); | ||
|
|
||
| /// @notice Thrown when a contract is in the process of being initialized during an upgrade. | ||
| error L2ContractsManager_InitializingDuringUpgrade(); | ||
|
|
||
| /// @notice Executes the upgrade for all predeploys. | ||
| /// @dev This function MUST be called via DELEGATECALL from the L2ProxyAdmin. | ||
| function upgrade() external; | ||
|
|
||
| /// @notice Returns the implementation addresses for each predeploy upgraded by the L2ContractsManager. | ||
| /// @return implementations_ The implementation addresses for each predeploy upgraded by the L2ContractsManager. | ||
| function getImplementations() | ||
| external | ||
| view | ||
| returns (L2ContractsManagerTypes.Implementations memory implementations_); | ||
|
|
||
| /// @notice Constructor for the L2ContractsManager contract. | ||
| /// @param _implementations The implementation struct containing the new implementation addresses for the L2 | ||
| /// predeploys. | ||
| function __constructor__(L2ContractsManagerTypes.Implementations memory _implementations) external; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.