diff --git a/packages/contracts-bedrock/interfaces/L1/IOPContractsManager.sol b/packages/contracts-bedrock/interfaces/L1/IOPContractsManager.sol index 118829029ea63..7b0c94669fbe4 100644 --- a/packages/contracts-bedrock/interfaces/L1/IOPContractsManager.sol +++ b/packages/contracts-bedrock/interfaces/L1/IOPContractsManager.sol @@ -265,9 +265,6 @@ interface IOPContractsManager { /// @notice Address of the ProtocolVersions contract shared by all chains. function protocolVersions() external view returns (IProtocolVersions); - /// @notice Address of the ProxyAdmin contract shared by all chains. - function superchainProxyAdmin() external view returns (IProxyAdmin); - // -------- Errors -------- /// @notice Thrown when an address is the zero address. @@ -317,8 +314,7 @@ interface IOPContractsManager { IOPContractsManagerInteropMigrator _opcmInteropMigrator, IOPContractsManagerStandardValidator _opcmStandardValidator, ISuperchainConfig _superchainConfig, - IProtocolVersions _protocolVersions, - IProxyAdmin _superchainProxyAdmin + IProtocolVersions _protocolVersions ) external; diff --git a/packages/contracts-bedrock/scripts/deploy/ChainAssertions.sol b/packages/contracts-bedrock/scripts/deploy/ChainAssertions.sol index 0f14886ecdcd9..0b0012291863e 100644 --- a/packages/contracts-bedrock/scripts/deploy/ChainAssertions.sol +++ b/packages/contracts-bedrock/scripts/deploy/ChainAssertions.sol @@ -32,7 +32,6 @@ import { IDelayedWETH } from "interfaces/dispute/IDelayedWETH.sol"; import { IOptimismMintableERC20Factory } from "interfaces/universal/IOptimismMintableERC20Factory.sol"; import { IPreimageOracle } from "interfaces/cannon/IPreimageOracle.sol"; import { IMIPS64 } from "interfaces/cannon/IMIPS64.sol"; -import { IProxyAdmin } from "interfaces/universal/IProxyAdmin.sol"; import { IETHLockbox } from "interfaces/L1/IETHLockbox.sol"; import { IProxyAdminOwnedBase } from "interfaces/L1/IProxyAdminOwnedBase.sol"; import { IAnchorStateRegistry } from "interfaces/dispute/IAnchorStateRegistry.sol"; @@ -377,8 +376,7 @@ library ChainAssertions { Types.ContractSet memory _impls, Types.ContractSet memory _proxies, IOPContractsManager _opcm, - IMIPS64 _mips, - IProxyAdmin _superchainProxyAdmin + IMIPS64 _mips ) internal view @@ -388,7 +386,6 @@ library ChainAssertions { require(bytes(_opcm.version()).length > 0, "CHECK-OPCM-15"); require(address(_opcm.protocolVersions()) == _proxies.ProtocolVersions, "CHECK-OPCM-17"); - require(address(_opcm.superchainProxyAdmin()) == address(_superchainProxyAdmin), "CHECK-OPCM-18"); require(address(_opcm.superchainConfig()) == _proxies.SuperchainConfig, "CHECK-OPCM-19"); // Ensure that the OPCM impls are correctly saved diff --git a/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol b/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol index fcf70f61cbb1f..fd91f93a2eac4 100644 --- a/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol +++ b/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol @@ -323,8 +323,7 @@ contract Deploy is Deployer { _impls: impls, _proxies: _proxies(), _opcm: IOPContractsManager(address(dio.opcm)), - _mips: IMIPS64(address(dio.mipsSingleton)), - _superchainProxyAdmin: superchainProxyAdmin + _mips: IMIPS64(address(dio.mipsSingleton)) }); ChainAssertions.checkSystemConfigImpls(impls); ChainAssertions.checkAnchorStateRegistryProxy(IAnchorStateRegistry(impls.AnchorStateRegistry), false); diff --git a/packages/contracts-bedrock/scripts/deploy/DeployImplementations.s.sol b/packages/contracts-bedrock/scripts/deploy/DeployImplementations.s.sol index 2503d23602e97..bc76955c48fda 100644 --- a/packages/contracts-bedrock/scripts/deploy/DeployImplementations.s.sol +++ b/packages/contracts-bedrock/scripts/deploy/DeployImplementations.s.sol @@ -206,8 +206,7 @@ contract DeployImplementations is Script { _output.opcmInteropMigrator, _output.opcmStandardValidator, _input.superchainConfigProxy, - _input.protocolVersionsProxy, - _input.superchainProxyAdmin + _input.protocolVersionsProxy ) ) ); @@ -769,8 +768,7 @@ contract DeployImplementations is Script { _impls: impls, _proxies: proxies, _opcm: IOPContractsManager(address(_output.opcm)), - _mips: IMIPS64(address(_output.mipsSingleton)), - _superchainProxyAdmin: _input.superchainProxyAdmin + _mips: IMIPS64(address(_output.mipsSingleton)) }); ChainAssertions.checkOptimismMintableERC20FactoryImpl(_output.optimismMintableERC20FactoryImpl); diff --git a/packages/contracts-bedrock/scripts/deploy/ReadSuperchainDeployment.s.sol b/packages/contracts-bedrock/scripts/deploy/ReadSuperchainDeployment.s.sol index ee678b9d9ea92..6c7b60a714f0d 100644 --- a/packages/contracts-bedrock/scripts/deploy/ReadSuperchainDeployment.s.sol +++ b/packages/contracts-bedrock/scripts/deploy/ReadSuperchainDeployment.s.sol @@ -8,6 +8,7 @@ import { IProtocolVersions, ProtocolVersion } from "interfaces/L1/IProtocolVersi import { IProxyAdmin } from "interfaces/universal/IProxyAdmin.sol"; import { IProxy } from "interfaces/universal/IProxy.sol"; import { IOPContractsManager } from "interfaces/L1/IOPContractsManager.sol"; +import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol"; contract ReadSuperchainDeployment is Script { struct Input { @@ -34,7 +35,7 @@ contract ReadSuperchainDeployment is Script { output_.protocolVersionsProxy = IProtocolVersions(opcm.protocolVersions()); output_.superchainConfigProxy = ISuperchainConfig(opcm.superchainConfig()); - output_.superchainProxyAdmin = IProxyAdmin(opcm.superchainProxyAdmin()); + output_.superchainProxyAdmin = IProxyAdmin(EIP1967Helper.getAdmin(address(output_.superchainConfigProxy))); IProxy protocolVersionsProxy = IProxy(payable(address(output_.protocolVersionsProxy))); IProxy superchainConfigProxy = IProxy(payable(address(output_.superchainConfigProxy))); diff --git a/packages/contracts-bedrock/scripts/deploy/VerifyOPCM.s.sol b/packages/contracts-bedrock/scripts/deploy/VerifyOPCM.s.sol index b8dc9a685b42f..3da017d5b70fd 100644 --- a/packages/contracts-bedrock/scripts/deploy/VerifyOPCM.s.sol +++ b/packages/contracts-bedrock/scripts/deploy/VerifyOPCM.s.sol @@ -149,7 +149,6 @@ contract VerifyOPCM is Script { // Getters verified via environment variables in _verifyOpcmImmutableVariables() expectedGetters["protocolVersions"] = "EXPECTED_PROTOCOL_VERSIONS"; expectedGetters["superchainConfig"] = "EXPECTED_SUPERCHAIN_CONFIG"; - expectedGetters["superchainProxyAdmin"] = "EXPECTED_SUPERCHAIN_PROXY_ADMIN"; // Getters for OPCM sub-contracts (addresses verified via bytecode comparison) expectedGetters["opcmDeployer"] = "SKIP"; // Address verified via bytecode comparison diff --git a/packages/contracts-bedrock/snapshots/abi/OPContractsManager.json b/packages/contracts-bedrock/snapshots/abi/OPContractsManager.json index 5372533426d4e..f90d2adb17018 100644 --- a/packages/contracts-bedrock/snapshots/abi/OPContractsManager.json +++ b/packages/contracts-bedrock/snapshots/abi/OPContractsManager.json @@ -35,11 +35,6 @@ "internalType": "contract IProtocolVersions", "name": "_protocolVersions", "type": "address" - }, - { - "internalType": "contract IProxyAdmin", - "name": "_superchainProxyAdmin", - "type": "address" } ], "stateMutability": "nonpayable", @@ -756,19 +751,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "superchainProxyAdmin", - "outputs": [ - { - "internalType": "contract IProxyAdmin", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/packages/contracts-bedrock/snapshots/semver-lock.json b/packages/contracts-bedrock/snapshots/semver-lock.json index 0316ab9250b5c..caa8ace5ae4ac 100644 --- a/packages/contracts-bedrock/snapshots/semver-lock.json +++ b/packages/contracts-bedrock/snapshots/semver-lock.json @@ -20,8 +20,8 @@ "sourceCodeHash": "0xfca613b5d055ffc4c3cbccb0773ddb9030abedc1aa6508c9e2e7727cc0cd617b" }, "src/L1/OPContractsManager.sol:OPContractsManager": { - "initCodeHash": "0x42721744f90fa46ee680fecc69da2e5caf7fdd8093c2a7f3b33958e574a15579", - "sourceCodeHash": "0x3eab23f3f034eec77afb620a122e51fded9214b5ed6a4c5663e0174714ae0f5e" + "initCodeHash": "0x4025118658a1c56c4fc2d0166081e6d27da980318e749e7811c7178115e4413e", + "sourceCodeHash": "0xdb243ac7475b0214b8f662aa04f696d9ff213dade6b1bdade379e84df419b75a" }, "src/L1/OPContractsManagerStandardValidator.sol:OPContractsManagerStandardValidator": { "initCodeHash": "0x57d6a6729d887ead009d518e8f17fa0d26bfc97b8efe1494ab4ef8dbb000d109", diff --git a/packages/contracts-bedrock/src/L1/OPContractsManager.sol b/packages/contracts-bedrock/src/L1/OPContractsManager.sol index f72daa376a22c..d87b903c86e23 100644 --- a/packages/contracts-bedrock/src/L1/OPContractsManager.sol +++ b/packages/contracts-bedrock/src/L1/OPContractsManager.sol @@ -1898,9 +1898,9 @@ contract OPContractsManager is ISemver { // -------- Constants and Variables -------- - /// @custom:semver 4.1.0 + /// @custom:semver 4.2.0 function version() public pure virtual returns (string memory) { - return "4.1.0"; + return "4.2.0"; } OPContractsManagerGameTypeAdder public immutable opcmGameTypeAdder; @@ -1919,9 +1919,6 @@ contract OPContractsManager is ISemver { /// @notice Address of the ProtocolVersions contract shared by all chains. IProtocolVersions public immutable protocolVersions; - /// @notice Address of the SuperchainProxyAdmin contract shared by all chains. - IProxyAdmin public immutable superchainProxyAdmin; - /// @notice The OPContractsManager contract that is currently being used. This is needed in the upgrade function /// which is intended to be DELEGATECALLed. OPContractsManager internal immutable thisOPCM; @@ -1979,8 +1976,7 @@ contract OPContractsManager is ISemver { OPContractsManagerInteropMigrator _opcmInteropMigrator, OPContractsManagerStandardValidator _opcmStandardValidator, ISuperchainConfig _superchainConfig, - IProtocolVersions _protocolVersions, - IProxyAdmin _superchainProxyAdmin + IProtocolVersions _protocolVersions ) { _opcmDeployer.assertValidContractAddress(address(_superchainConfig)); _opcmDeployer.assertValidContractAddress(address(_protocolVersions)); @@ -1996,7 +1992,6 @@ contract OPContractsManager is ISemver { opcmStandardValidator = _opcmStandardValidator; superchainConfig = _superchainConfig; protocolVersions = _protocolVersions; - superchainProxyAdmin = _superchainProxyAdmin; thisOPCM = this; } diff --git a/packages/contracts-bedrock/test/L1/OPContractsManager.t.sol b/packages/contracts-bedrock/test/L1/OPContractsManager.t.sol index 66c421b1e8c7b..bd0951c487e09 100644 --- a/packages/contracts-bedrock/test/L1/OPContractsManager.t.sol +++ b/packages/contracts-bedrock/test/L1/OPContractsManager.t.sol @@ -68,8 +68,7 @@ contract OPContractsManager_Harness is OPContractsManager { OPContractsManagerInteropMigrator _opcmInteropMigrator, OPContractsManagerStandardValidator _opcmStandardValidator, ISuperchainConfig _superchainConfig, - IProtocolVersions _protocolVersions, - IProxyAdmin _superchainProxyAdmin + IProtocolVersions _protocolVersions ) OPContractsManager( _opcmGameTypeAdder, @@ -78,8 +77,7 @@ contract OPContractsManager_Harness is OPContractsManager { _opcmInteropMigrator, _opcmStandardValidator, _superchainConfig, - _protocolVersions, - _superchainProxyAdmin + _protocolVersions ) { } @@ -340,7 +338,6 @@ contract OPContractsManager_TestInit is CommonTest { function setupEnvVars() public { vm.setEnv("EXPECTED_SUPERCHAIN_CONFIG", vm.toString(address(opcm.superchainConfig()))); vm.setEnv("EXPECTED_PROTOCOL_VERSIONS", vm.toString(address(opcm.protocolVersions()))); - vm.setEnv("EXPECTED_SUPERCHAIN_PROXY_ADMIN", vm.toString(address(opcm.superchainProxyAdmin()))); } /// @notice Helper function to deploy a new set of L1 contracts via OPCM. @@ -460,8 +457,7 @@ contract OPContractsManager_ChainIdToBatchInboxAddress_Test is Test, FeatureFlag opcmImplementations, superchainConfigProxy, address(superchainProxyAdmin), challenger, 100, bytes32(0) ), _superchainConfig: superchainConfigProxy, - _protocolVersions: protocolVersionsProxy, - _superchainProxyAdmin: superchainProxyAdmin + _protocolVersions: protocolVersionsProxy }); } @@ -1258,7 +1254,6 @@ contract OPContractsManager_Upgrade_Test is OPContractsManager_Upgrade_Harness { // Set up environment variables with the actual OPCM addresses for tests that need themqq vm.setEnv("EXPECTED_SUPERCHAIN_CONFIG", vm.toString(address(opcm.superchainConfig()))); vm.setEnv("EXPECTED_PROTOCOL_VERSIONS", vm.toString(address(opcm.protocolVersions()))); - vm.setEnv("EXPECTED_SUPERCHAIN_PROXY_ADMIN", vm.toString(address(opcm.superchainProxyAdmin()))); // Run the upgrade test and checks runCurrentUpgrade(upgrader); diff --git a/packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol b/packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol index 4090ab61fdd21..7d1a05864cc6f 100644 --- a/packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol +++ b/packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol @@ -462,16 +462,13 @@ contract VerifyOPCM_Run_Test is VerifyOPCM_TestInit { // Set expected addresses via environment variables address expectedSuperchainConfig = address(0x1111); address expectedProtocolVersions = address(0x2222); - address expectedSuperchainProxyAdmin = address(0x3333); vm.setEnv("EXPECTED_SUPERCHAIN_CONFIG", vm.toString(expectedSuperchainConfig)); vm.setEnv("EXPECTED_PROTOCOL_VERSIONS", vm.toString(expectedProtocolVersions)); - vm.setEnv("EXPECTED_SUPERCHAIN_PROXY_ADMIN", vm.toString(expectedSuperchainProxyAdmin)); // Test that mocking each individual getter causes verification to fail _assertOnOpcmGetter(IOPContractsManager.superchainConfig.selector); _assertOnOpcmGetter(IOPContractsManager.protocolVersions.selector); - _assertOnOpcmGetter(IOPContractsManager.superchainProxyAdmin.selector); // Reset environment variables to correct values (as set in setUp()) setupEnvVars();