Skip to content

Commit

Permalink
fix: only set address manager for OP Chain's ProxyAdmin
Browse files Browse the repository at this point in the history
  • Loading branch information
maurelian committed Sep 25, 2024
1 parent 2d2c5e8 commit 8adedf0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/contracts-bedrock/scripts/deploy/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8adedf0

Please sign in to comment.