From 6b1b4734c8c9317a999f3ee99f328251d21fad93 Mon Sep 17 00:00:00 2001 From: agusduha Date: Wed, 5 Feb 2025 12:18:54 -0300 Subject: [PATCH] fix: remove unused interop contracts --- .semgrep/rules/sol-rules.yaml | 3 --- .../pkg/deployer/opcm/implementations.go | 6 ------ .../L1/IOPContractsManagerInterop.sol | 20 ------------------- .../test/vendor/Initializable.t.sol | 3 +-- 4 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 packages/contracts-bedrock/interfaces/L1/IOPContractsManagerInterop.sol diff --git a/.semgrep/rules/sol-rules.yaml b/.semgrep/rules/sol-rules.yaml index 27d6d1e7fd4..d15f46dd3c7 100644 --- a/.semgrep/rules/sol-rules.yaml +++ b/.semgrep/rules/sol-rules.yaml @@ -166,7 +166,6 @@ rules: paths: exclude: - packages/contracts-bedrock/src/L1/OPContractsManager.sol - - packages/contracts-bedrock/src/L1/OPContractsManagerInterop.sol - packages/contracts-bedrock/src/legacy/L1ChugSplashProxy.sol - id: sol-style-enforce-require-msg @@ -209,7 +208,6 @@ rules: } paths: exclude: - - packages/contracts-bedrock/src/L1/SystemConfigInterop.sol - packages/contracts-bedrock/src/L1/OptimismPortalInterop.sol - id: sol-safety-proper-initializer @@ -230,4 +228,3 @@ rules: paths: exclude: - packages/contracts-bedrock/src/L1/SystemConfig.sol - - packages/contracts-bedrock/src/L1/SystemConfigInterop.sol diff --git a/op-deployer/pkg/deployer/opcm/implementations.go b/op-deployer/pkg/deployer/opcm/implementations.go index 7e8d70bf535..4fdcc37c0a6 100644 --- a/op-deployer/pkg/deployer/opcm/implementations.go +++ b/op-deployer/pkg/deployer/opcm/implementations.go @@ -86,18 +86,12 @@ func DeployImplementations( defer cleanupDeploy() opcmContract := "OPContractsManager" - if input.UseInterop { - opcmContract = "OPContractsManagerInterop" - } if err := host.RememberOnLabel("OPContractsManager", opcmContract+".sol", opcmContract); err != nil { return output, fmt.Errorf("failed to link OPContractsManager label: %w", err) } // So we can see in detail where the SystemConfig interop initializer fails sysConfig := "SystemConfig" - if input.UseInterop { - sysConfig = "SystemConfigInterop" - } if err := host.RememberOnLabel("SystemConfigImpl", sysConfig+".sol", sysConfig); err != nil { return output, fmt.Errorf("failed to link SystemConfig label: %w", err) } diff --git a/packages/contracts-bedrock/interfaces/L1/IOPContractsManagerInterop.sol b/packages/contracts-bedrock/interfaces/L1/IOPContractsManagerInterop.sol deleted file mode 100644 index 7e323f70de2..00000000000 --- a/packages/contracts-bedrock/interfaces/L1/IOPContractsManagerInterop.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import { ISuperchainConfig } from "interfaces/L1/ISuperchainConfig.sol"; -import { IProtocolVersions } from "interfaces/L1/IProtocolVersions.sol"; -import { IProxyAdmin } from "interfaces/universal/IProxyAdmin.sol"; -import { IOPContractsManager } from "interfaces/L1/IOPContractsManager.sol"; - -interface IOPContractsManagerInterop is IOPContractsManager { - function __constructor__( - ISuperchainConfig _superchainConfig, - IProtocolVersions _protocolVersions, - IProxyAdmin _superchainProxyAdmin, - string memory _l1ContractsRelease, - Blueprints memory _blueprints, - Implementations memory _implementations, - address _upgradeController - ) - external; -} diff --git a/packages/contracts-bedrock/test/vendor/Initializable.t.sol b/packages/contracts-bedrock/test/vendor/Initializable.t.sol index a0ee9e9f5e3..f58d50381a5 100644 --- a/packages/contracts-bedrock/test/vendor/Initializable.t.sol +++ b/packages/contracts-bedrock/test/vendor/Initializable.t.sol @@ -345,7 +345,7 @@ contract Initializer_Test is CommonTest { function test_cannotReinitialize_succeeds() public { // Collect exclusions. uint256 j = 0; - string[] memory excludes = new string[](10); + string[] memory excludes = new string[](9); // TODO: Neither of these contracts are labeled properly in the deployment script. Both are // currently being labeled as their non-interop versions. Remove these exclusions once // the deployment script is fixed. @@ -363,7 +363,6 @@ contract Initializer_Test is CommonTest { excludes[j++] = "src/dispute/PermissionedDisputeGame.sol"; // TODO: Eventually remove this exclusion. Same reason as above dispute contracts. excludes[j++] = "src/L1/OPContractsManager.sol"; - excludes[j++] = "src/L1/OPContractsManagerInterop.sol"; // L2 contract initialization is tested in Predeploys.t.sol excludes[j++] = "src/L2/*"; // Exclude SharedLockbox since using OZv5 initializer