Skip to content

Commit

Permalink
Pass owner to DeployChain explicitly (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog authored Jan 9, 2025
1 parent 7ff728c commit 6e65391
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions contracts/script/DeployDeployChain.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ contract DeployDeployChain is Script, Artifacts {
console.log("Deploying DeployChain implementation");
vm.broadcast();
DeployChain deployChain = new DeployChain{salt: _implSalt()}({
_owner: tx.origin,
_proxyAdmin: mustGetAddress("ProxyAdmin"),
_optimismPortal: mustGetAddress("OptimismPortalProxy"),
_systemConfig: mustGetAddress("SystemConfigProxy"),
Expand Down
1 change: 1 addition & 0 deletions contracts/script/DeploySystem.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ contract DeploySystem is Deploy {
function deployDeployChain() public broadcast returns (address addr_) {
console.log("Deploying DeployChain implementation");
DeployChain deployChain = new DeployChain{salt: _implSalt()}({
_owner: tx.origin,
_proxyAdmin: mustGetAddress("ProxyAdmin"),
_optimismPortal: mustGetAddress("OptimismPortalProxy"),
_systemConfig: mustGetAddress("SystemConfigProxy"),
Expand Down
2 changes: 2 additions & 0 deletions contracts/src/DeployChain.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ contract DeployChain is Ownable {
address public immutable protocolVersions;

constructor(
address _owner,
address _proxyAdmin,
address _optimismPortal,
address _systemConfig,
Expand Down Expand Up @@ -108,6 +109,7 @@ contract DeployChain is Ownable {
l2OutputOracle = _l2OutputOracle;
superchainConfig = _superchainConfig;
protocolVersions = _protocolVersions;
transferOwnership(_owner);
}

function deployAddresses(uint256 chainID) external view returns (DeployAddresses memory) {
Expand Down

0 comments on commit 6e65391

Please sign in to comment.