Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .semgrep/rules/sol-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ rules:
- packages/contracts-bedrock/src/L2/FeeVault.sol
- packages/contracts-bedrock/src/L2/OptimismMintableERC721.sol
- packages/contracts-bedrock/src/L2/OptimismMintableERC721Factory.sol
- packages/contracts-bedrock/src/L2/XForkL2ContractsManager.sol
Comment thread
maurelian marked this conversation as resolved.
Outdated
- packages/contracts-bedrock/src/L2/L2ContractsManager.sol
- packages/contracts-bedrock/src/cannon/MIPS64.sol
- packages/contracts-bedrock/src/cannon/PreimageOracle.sol
- packages/contracts-bedrock/src/dispute/AnchorStateRegistry.sol
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
// 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 {
Comment thread
maurelian marked this conversation as resolved.
/// @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 Executes the upgrade for all predeploys.
/// @dev This function MUST be called via DELEGATECALL from the L2ProxyAdmin.
function upgrade() external;

/// @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;
}
201 changes: 201 additions & 0 deletions packages/contracts-bedrock/snapshots/abi/L2ContractsManager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
[
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "storageSetterImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l2CrossDomainMessengerImpl",
"type": "address"
},
{
"internalType": "address",
"name": "gasPriceOracleImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l2StandardBridgeImpl",
"type": "address"
},
{
"internalType": "address",
"name": "sequencerFeeWalletImpl",
"type": "address"
},
{
"internalType": "address",
"name": "optimismMintableERC20FactoryImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l2ERC721BridgeImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l1BlockImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l1BlockCGTImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l2ToL1MessagePasserImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l2ToL1MessagePasserCGTImpl",
"type": "address"
},
{
"internalType": "address",
"name": "optimismMintableERC721FactoryImpl",
"type": "address"
},
{
"internalType": "address",
"name": "proxyAdminImpl",
"type": "address"
},
{
"internalType": "address",
"name": "baseFeeVaultImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l1FeeVaultImpl",
"type": "address"
},
{
"internalType": "address",
"name": "operatorFeeVaultImpl",
"type": "address"
},
{
"internalType": "address",
"name": "schemaRegistryImpl",
"type": "address"
},
{
"internalType": "address",
"name": "easImpl",
"type": "address"
},
{
"internalType": "address",
"name": "crossL2InboxImpl",
"type": "address"
},
{
"internalType": "address",
"name": "l2ToL2CrossDomainMessengerImpl",
"type": "address"
},
{
"internalType": "address",
"name": "superchainETHBridgeImpl",
"type": "address"
},
{
"internalType": "address",
"name": "ethLiquidityImpl",
"type": "address"
},
{
"internalType": "address",
"name": "optimismSuperchainERC20FactoryImpl",
"type": "address"
},
{
"internalType": "address",
"name": "optimismSuperchainERC20BeaconImpl",
"type": "address"
},
{
"internalType": "address",
"name": "superchainTokenBridgeImpl",
"type": "address"
},
{
"internalType": "address",
"name": "nativeAssetLiquidityImpl",
"type": "address"
},
{
"internalType": "address",
"name": "liquidityControllerImpl",
"type": "address"
},
{
"internalType": "address",
"name": "feeSplitterImpl",
"type": "address"
},
{
"internalType": "address",
"name": "conditionalDeployerImpl",
"type": "address"
}
],
"internalType": "struct L2ContractsManagerTypes.Implementations",
"name": "_implementations",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "upgrade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_target",
"type": "address"
}
],
"name": "L2ContractsManager_DowngradeNotAllowed",
"type": "error"
},
{
"inputs": [],
"name": "L2ContractsManager_OnlyDelegatecall",
"type": "error"
},
{
"inputs": [],
"name": "SemverComp_InvalidSemverParts",
"type": "error"
}
]
4 changes: 4 additions & 0 deletions packages/contracts-bedrock/snapshots/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
"initCodeHash": "0x6efb9055142e90b408c6312074243769df0d365f6f984e226e0320bec55a45b8",
"sourceCodeHash": "0x7e438cbbe9a8248887b8c21f68c811f90a5cae4902cbbf7b0a1f6cd644dc42d9"
},
"src/L2/L2ContractsManager.sol:L2ContractsManager": {
"initCodeHash": "0x2f41a11c7ed9bddbccebe9486243af5bc2693d1d98dfd77afb48f4154280c2e5",
"sourceCodeHash": "0x977efd878ca60d12f5a9348ad9c0502fe9cdae31d5579bd580fc76c3c0992a3a"
},
"src/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger": {
"initCodeHash": "0xe160be403df12709c371c33195d1b9c3b5e9499e902e86bdabc8eed749c3fd61",
"sourceCodeHash": "0x12ea125038b87e259a0d203e119faa6e9726ab2bdbc30430f820ccd48fe87e14"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Loading