Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .semgrep/rules/sol-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ 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/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,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;
}
Loading