Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch DeployChain to be Ownable, and deploy onlyOwner #45

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions contracts/src/DeployChain.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ResolvingProxyFactory} from "./ResolvingProxyFactory.sol";
import {Portal} from "./Portal.sol";
import {OutputOracle} from "./OutputOracle.sol";
Expand All @@ -21,7 +22,7 @@ import {Hashing} from "@eth-optimism-bedrock/src/libraries/Hashing.sol";
import {Types} from "@eth-optimism-bedrock/src/libraries/Types.sol";
import {Constants} from "@eth-optimism-bedrock/src/libraries/Constants.sol";

contract DeployChain {
contract DeployChain is Ownable {
struct DeployAddresses {
address l2OutputOracle;
address systemConfig;
Expand Down Expand Up @@ -122,7 +123,7 @@ contract DeployChain {
GasConfiguration memory gasConfig,
AddressConfiguration memory addressConfig,
bool proofsEnabled
) external {
) external onlyOwner {
DeployAddresses memory addresses = setupProxies(chainID);

Hashes memory hashes = calculateHashes(chainID, genesisConfig, gasConfig, addressConfig.batcher, addresses);
Expand Down Expand Up @@ -158,7 +159,7 @@ contract DeployChain {
});
}

function deployProxy(address proxy, bytes32 salt) public returns (address) {
function deployProxy(address proxy, bytes32 salt) internal returns (address) {
return ResolvingProxyFactory.setupProxy(proxy, proxyAdmin, salt);
}

Expand Down
Loading