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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -317,8 +314,7 @@ interface IOPContractsManager {
IOPContractsManagerInteropMigrator _opcmInteropMigrator,
IOPContractsManagerStandardValidator _opcmStandardValidator,
ISuperchainConfig _superchainConfig,
IProtocolVersions _protocolVersions,
IProxyAdmin _superchainProxyAdmin
IProtocolVersions _protocolVersions
)
external;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -377,8 +376,7 @@ library ChainAssertions {
Types.ContractSet memory _impls,
Types.ContractSet memory _proxies,
IOPContractsManager _opcm,
IMIPS64 _mips,
IProxyAdmin _superchainProxyAdmin
IMIPS64 _mips
)
internal
view
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions packages/contracts-bedrock/scripts/deploy/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ contract DeployImplementations is Script {
_output.opcmInteropMigrator,
_output.opcmStandardValidator,
_input.superchainConfigProxy,
_input.protocolVersionsProxy,
_input.superchainProxyAdmin
_input.protocolVersionsProxy
)
)
);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
"internalType": "contract IProtocolVersions",
"name": "_protocolVersions",
"type": "address"
},
{
"internalType": "contract IProxyAdmin",
"name": "_superchainProxyAdmin",
"type": "address"
}
],
"stateMutability": "nonpayable",
Expand Down Expand Up @@ -756,19 +751,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "superchainProxyAdmin",
"outputs": [
{
"internalType": "contract IProxyAdmin",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/snapshots/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 3 additions & 8 deletions packages/contracts-bedrock/src/L1/OPContractsManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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));
Expand All @@ -1996,7 +1992,6 @@ contract OPContractsManager is ISemver {
opcmStandardValidator = _opcmStandardValidator;
superchainConfig = _superchainConfig;
protocolVersions = _protocolVersions;
superchainProxyAdmin = _superchainProxyAdmin;
thisOPCM = this;
}

Expand Down
11 changes: 3 additions & 8 deletions packages/contracts-bedrock/test/L1/OPContractsManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ contract OPContractsManager_Harness is OPContractsManager {
OPContractsManagerInteropMigrator _opcmInteropMigrator,
OPContractsManagerStandardValidator _opcmStandardValidator,
ISuperchainConfig _superchainConfig,
IProtocolVersions _protocolVersions,
IProxyAdmin _superchainProxyAdmin
IProtocolVersions _protocolVersions
)
OPContractsManager(
_opcmGameTypeAdder,
Expand All @@ -78,8 +77,7 @@ contract OPContractsManager_Harness is OPContractsManager {
_opcmInteropMigrator,
_opcmStandardValidator,
_superchainConfig,
_protocolVersions,
_superchainProxyAdmin
_protocolVersions
)
{ }

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
});
}

Expand Down Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down