diff --git a/packages/contracts-bedrock/src/L1/OPStackManager.sol b/packages/contracts-bedrock/src/L1/OPStackManager.sol index c6f868e7e0836..6f0ab58fe71af 100644 --- a/packages/contracts-bedrock/src/L1/OPStackManager.sol +++ b/packages/contracts-bedrock/src/L1/OPStackManager.sol @@ -185,34 +185,18 @@ contract OPStackManager is ISemver, Initializable { } function initialize(InitializerInputs memory _initializerInputs) public initializer { - initializePart1(_initializerInputs.blueprints); - initializePart2(_initializerInputs.release, _initializerInputs.isLatest, _initializerInputs.setters); - } - - // Step 1: Initialize blueprint contracts - function initializePart1(Blueprints memory _blueprints) internal { - assertValidContractAddress(_blueprints.addressManager); - assertValidContractAddress(_blueprints.proxy); - assertValidContractAddress(_blueprints.proxyAdmin); - assertValidContractAddress(_blueprints.l1ChugSplashProxy); - assertValidContractAddress(_blueprints.resolvedDelegateProxy); - blueprint = _blueprints; - } + if (_initializerInputs.isLatest) latestRelease = _initializerInputs.release; - // Step 2: Initialize implementations for a release version - function initializePart2(string memory _release, bool _isLatest, ImplementationSetter[] memory _setters) internal { - if (_isLatest) { - latestRelease = _release; - } - - for (uint256 i = 0; i < _setters.length; i++) { - ImplementationSetter memory setter = _setters[i]; - Implementation storage impl = implementations[_release][setter.name]; + for (uint256 i = 0; i < _initializerInputs.setters.length; i++) { + ImplementationSetter memory setter = _initializerInputs.setters[i]; + Implementation storage impl = implementations[_initializerInputs.release][setter.name]; if (impl.logic != address(0)) revert AlreadyReleased(); impl.initializer = setter.info.initializer; impl.logic = setter.info.logic; } + + blueprint = _initializerInputs.blueprints; } function setRelease(SetRelease memory _setRelease) external {