From 8adedf09efd171d6365f697a9260b935b69f2fb9 Mon Sep 17 00:00:00 2001 From: Maurelian Date: Wed, 25 Sep 2024 16:34:42 -0400 Subject: [PATCH] fix: only set address manager for OP Chain's ProxyAdmin --- .../contracts-bedrock/scripts/deploy/Deploy.s.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol b/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol index 790b020c81ba..8c9ce1f7ed92 100644 --- a/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol +++ b/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol @@ -432,13 +432,13 @@ contract Deploy is Deployer { ProxyAdmin admin = new ProxyAdmin{ salt: _implSalt() }({ _owner: msg.sender }); require(admin.owner() == msg.sender); - AddressManager addressManager = AddressManager(mustGetAddress("AddressManager")); - if (admin.addressManager() != addressManager) { - admin.setAddressManager(addressManager); + if (!_isSuperchain) { + AddressManager addressManager = AddressManager(mustGetAddress("AddressManager")); + if (admin.addressManager() != addressManager) { + admin.setAddressManager(addressManager); + } + require(admin.addressManager() == addressManager); } - - require(admin.addressManager() == addressManager); - save(proxyAdminName, address(admin)); console.log("%s deployed at %s", proxyAdminName, address(admin)); addr_ = address(admin);