diff --git a/op-chain-ops/deployer/opcm/superchain.go b/op-chain-ops/deployer/opcm/superchain.go index 34804cc2bbdf..4f648bbfa8a3 100644 --- a/op-chain-ops/deployer/opcm/superchain.go +++ b/op-chain-ops/deployer/opcm/superchain.go @@ -14,7 +14,7 @@ import ( ) type DeploySuperchainInput struct { - ProxyAdminOwner common.Address `toml:"proxyAdminOwner"` + SuperchainProxyAdminOwner common.Address `toml:"superchainProxyAdminOwner"` ProtocolVersionsOwner common.Address `toml:"protocolVersionsOwner"` Guardian common.Address `toml:"guardian"` Paused bool `toml:"paused"` diff --git a/op-chain-ops/deployer/pipeline/superchain.go b/op-chain-ops/deployer/pipeline/superchain.go index cc1b8d04160c..13737475c916 100644 --- a/op-chain-ops/deployer/pipeline/superchain.go +++ b/op-chain-ops/deployer/pipeline/superchain.go @@ -40,7 +40,7 @@ func DeploySuperchain(ctx context.Context, env *Env, artifactsFS foundry.StatDir dso, err = opcm.DeploySuperchain( host, opcm.DeploySuperchainInput{ - ProxyAdminOwner: intent.SuperchainRoles.ProxyAdminOwner, + SuperchainProxyAdminOwner: intent.SuperchainRoles.ProxyAdminOwner, ProtocolVersionsOwner: intent.SuperchainRoles.ProtocolVersionsOwner, Guardian: intent.SuperchainRoles.Guardian, Paused: false, diff --git a/op-chain-ops/interopgen/deploy.go b/op-chain-ops/interopgen/deploy.go index 692a80d3225e..be837484e512 100644 --- a/op-chain-ops/interopgen/deploy.go +++ b/op-chain-ops/interopgen/deploy.go @@ -149,7 +149,7 @@ func deploySuperchainToL1(l1Host *script.Host, superCfg *SuperchainConfig) (*Sup l1Host.SetTxOrigin(superCfg.Deployer) superDeployment, err := opcm.DeploySuperchain(l1Host, opcm.DeploySuperchainInput{ - ProxyAdminOwner: superCfg.ProxyAdminOwner, + SuperchainProxyAdminOwner: superCfg.ProxyAdminOwner, ProtocolVersionsOwner: superCfg.ProtocolVersionsOwner, Guardian: superCfg.SuperchainConfigGuardian, Paused: superCfg.Paused, diff --git a/packages/contracts-bedrock/scripts/DeploySuperchain.s.sol b/packages/contracts-bedrock/scripts/DeploySuperchain.s.sol index 5ca889bf409e..7726d5709076 100644 --- a/packages/contracts-bedrock/scripts/DeploySuperchain.s.sol +++ b/packages/contracts-bedrock/scripts/DeploySuperchain.s.sol @@ -81,7 +81,7 @@ contract DeploySuperchainInput is BaseDeployIO { // Role inputs. address internal _guardian; address internal _protocolVersionsOwner; - address internal _proxyAdminOwner; + address internal _superchainProxyAdminOwner; // Other inputs. bool internal _paused; @@ -94,7 +94,7 @@ contract DeploySuperchainInput is BaseDeployIO { require(_address != address(0), "DeploySuperchainInput: cannot set zero address"); if (_sel == this.guardian.selector) _guardian = _address; else if (_sel == this.protocolVersionsOwner.selector) _protocolVersionsOwner = _address; - else if (_sel == this.proxyAdminOwner.selector) _proxyAdminOwner = _address; + else if (_sel == this.superchainProxyAdminOwner.selector) _superchainProxyAdminOwner = _address; else revert("DeploySuperchainInput: unknown selector"); } @@ -115,9 +115,9 @@ contract DeploySuperchainInput is BaseDeployIO { // validate that each input is set before accessing it. With getter methods, we can automatically // validate that each input is set before allowing any field to be accessed. - function proxyAdminOwner() public view returns (address) { - require(_proxyAdminOwner != address(0), "DeploySuperchainInput: proxyAdminOwner not set"); - return _proxyAdminOwner; + function superchainProxyAdminOwner() public view returns (address) { + require(_superchainProxyAdminOwner != address(0), "DeploySuperchainInput: superchainProxyAdminOwner not set"); + return _superchainProxyAdminOwner; } function protocolVersionsOwner() public view returns (address) { @@ -232,7 +232,7 @@ contract DeploySuperchainOutput is BaseDeployIO { } function assertValidSuperchainProxyAdmin(DeploySuperchainInput _dsi) internal view { - require(superchainProxyAdmin().owner() == _dsi.proxyAdminOwner(), "SPA-10"); + require(superchainProxyAdmin().owner() == _dsi.superchainProxyAdminOwner(), "SPA-10"); } function assertValidSuperchainConfig(DeploySuperchainInput _dsi) internal { @@ -386,13 +386,13 @@ contract DeploySuperchain is Script { } function transferProxyAdminOwnership(DeploySuperchainInput _dsi, DeploySuperchainOutput _dso) public { - address proxyAdminOwner = _dsi.proxyAdminOwner(); + address superchainProxyAdminOwner = _dsi.superchainProxyAdminOwner(); ProxyAdmin superchainProxyAdmin = _dso.superchainProxyAdmin(); DeployUtils.assertValidContractAddress(address(superchainProxyAdmin)); vm.broadcast(msg.sender); - superchainProxyAdmin.transferOwnership(proxyAdminOwner); + superchainProxyAdmin.transferOwnership(superchainProxyAdminOwner); } // -------- Utilities -------- diff --git a/packages/contracts-bedrock/test/DeployOPChain.t.sol b/packages/contracts-bedrock/test/DeployOPChain.t.sol index 3cbc313cfe11..445602062d5a 100644 --- a/packages/contracts-bedrock/test/DeployOPChain.t.sol +++ b/packages/contracts-bedrock/test/DeployOPChain.t.sol @@ -308,7 +308,7 @@ contract DeployOPChain_TestBase is Test { DeployOPChainOutput doo; // Define default inputs for DeploySuperchain. - address proxyAdminOwner = makeAddr("defaultProxyAdminOwner"); + address superchainProxyAdminOwner = makeAddr("defaultSuperchainProxyAdminOwner"); address protocolVersionsOwner = makeAddr("defaultProtocolVersionsOwner"); address guardian = makeAddr("defaultGuardian"); bool paused = false; @@ -365,7 +365,7 @@ contract DeployOPChain_TestBase is Test { DeploySuperchain deploySuperchain = new DeploySuperchain(); (DeploySuperchainInput dsi, DeploySuperchainOutput dso) = deploySuperchain.etchIOContracts(); - dsi.set(dsi.proxyAdminOwner.selector, proxyAdminOwner); + dsi.set(dsi.superchainProxyAdminOwner.selector, superchainProxyAdminOwner); dsi.set(dsi.protocolVersionsOwner.selector, protocolVersionsOwner); dsi.set(dsi.guardian.selector, guardian); dsi.set(dsi.paused.selector, paused); diff --git a/packages/contracts-bedrock/test/DeploySuperchain.t.sol b/packages/contracts-bedrock/test/DeploySuperchain.t.sol index 4b51aae0f3d6..a6bcf2aa2f50 100644 --- a/packages/contracts-bedrock/test/DeploySuperchain.t.sol +++ b/packages/contracts-bedrock/test/DeploySuperchain.t.sol @@ -13,7 +13,7 @@ import { DeploySuperchainInput, DeploySuperchain, DeploySuperchainOutput } from contract DeploySuperchainInput_Test is Test { DeploySuperchainInput dsi; - address proxyAdminOwner = makeAddr("defaultProxyAdminOwner"); + address superchainProxyAdminOwner = makeAddr("superchainProxyAdminOwner"); address protocolVersionsOwner = makeAddr("defaultProtocolVersionsOwner"); address guardian = makeAddr("defaultGuardian"); bool paused = false; @@ -25,8 +25,8 @@ contract DeploySuperchainInput_Test is Test { } function test_getters_whenNotSet_revert() public { - vm.expectRevert("DeploySuperchainInput: proxyAdminOwner not set"); - dsi.proxyAdminOwner(); + vm.expectRevert("DeploySuperchainInput: superchainProxyAdminOwner not set"); + dsi.superchainProxyAdminOwner(); vm.expectRevert("DeploySuperchainInput: protocolVersionsOwner not set"); dsi.protocolVersionsOwner(); @@ -151,7 +151,7 @@ contract DeploySuperchain_Test is Test { // Generate random input values from the seed. This doesn't give us the benefit of the forge // fuzzer's dictionary, but that's ok because we are just testing that values are set and // passed correctly. - address proxyAdminOwner = address(uint160(uint256(hash(_seed, 0)))); + address superchainProxyAdminOwner = address(uint160(uint256(hash(_seed, 0)))); address protocolVersionsOwner = address(uint160(uint256(hash(_seed, 1)))); address guardian = address(uint160(uint256(hash(_seed, 2)))); bool paused = bool(uint8(uint256(hash(_seed, 3))) % 2 == 0); @@ -159,7 +159,7 @@ contract DeploySuperchain_Test is Test { ProtocolVersion recommendedProtocolVersion = ProtocolVersion.wrap(uint256(hash(_seed, 5))); // Set the input values on the input contract. - dsi.set(dsi.proxyAdminOwner.selector, proxyAdminOwner); + dsi.set(dsi.superchainProxyAdminOwner.selector, superchainProxyAdminOwner); dsi.set(dsi.protocolVersionsOwner.selector, protocolVersionsOwner); dsi.set(dsi.guardian.selector, guardian); dsi.set(dsi.paused.selector, paused); @@ -170,7 +170,7 @@ contract DeploySuperchain_Test is Test { deploySuperchain.run(dsi, dso); // Assert inputs were properly passed through to the contract initializers. - assertEq(address(dso.superchainProxyAdmin().owner()), proxyAdminOwner, "100"); + assertEq(address(dso.superchainProxyAdmin().owner()), superchainProxyAdminOwner, "100"); assertEq(address(dso.protocolVersionsProxy().owner()), protocolVersionsOwner, "200"); assertEq(address(dso.superchainConfigProxy().guardian()), guardian, "300"); assertEq(dso.superchainConfigProxy().paused(), paused, "400"); @@ -196,7 +196,7 @@ contract DeploySuperchain_Test is Test { function test_run_NullInput_reverts() public { // Set default values for all inputs. - dsi.set(dsi.proxyAdminOwner.selector, defaultProxyAdminOwner); + dsi.set(dsi.superchainProxyAdminOwner.selector, defaultProxyAdminOwner); dsi.set(dsi.protocolVersionsOwner.selector, defaultProtocolVersionsOwner); dsi.set(dsi.guardian.selector, defaultGuardian); dsi.set(dsi.paused.selector, defaultPaused); @@ -207,8 +207,8 @@ contract DeploySuperchain_Test is Test { // methods to set the zero address, so we use StdStorage. We can't use the `checked_write` // method, because it does a final call to test that the value was set correctly, but for us // that would revert. Therefore we use StdStorage to find the slot, then we write to it. - uint256 slot = zeroOutSlotForSelector(dsi.proxyAdminOwner.selector); - vm.expectRevert("DeploySuperchainInput: proxyAdminOwner not set"); + uint256 slot = zeroOutSlotForSelector(dsi.superchainProxyAdminOwner.selector); + vm.expectRevert("DeploySuperchainInput: superchainProxyAdminOwner not set"); deploySuperchain.run(dsi, dso); // Restore the value we just tested. vm.store(address(dsi), bytes32(slot), bytes32(uint256(uint160(defaultProxyAdminOwner))));