Commit 5bf29864 authored by Maurelian's avatar Maurelian

contracts-bedrock: Add more divider comments

parent dd747f9e
......@@ -54,6 +54,10 @@ import { Types } from "scripts/Types.sol";
contract Deploy is Deployer {
DeployConfig cfg;
////////////////////////////////////////////////////////////////
// Modifiers //
////////////////////////////////////////////////////////////////
/// @notice Modifier that wraps a function in broadcasting.
modifier broadcast() {
vm.startBroadcast();
......@@ -81,7 +85,9 @@ contract Deploy is Deployer {
}
}
/* --- getter functions --- */
////////////////////////////////////////////////////////////////
// Accessors //
////////////////////////////////////////////////////////////////
/// @inheritdoc Deployer
function name() public pure override returns (string memory name_) {
......@@ -161,6 +167,21 @@ contract Deploy is Deployer {
_callViaSafe({ _target: proxyAdmin, _data: data });
}
/// @notice Transfer ownership of the ProxyAdmin contract to the final system owner
function transferProxyAdminOwnership() public broadcast {
ProxyAdmin proxyAdmin = ProxyAdmin(mustGetAddress("ProxyAdmin"));
address owner = proxyAdmin.owner();
address safe = mustGetAddress("SystemOwnerSafe");
if (owner != safe) {
proxyAdmin.transferOwnership(safe);
console.log("ProxyAdmin ownership transferred to Safe at: %s", safe);
}
}
////////////////////////////////////////////////////////////////
// SetUp and Run //
////////////////////////////////////////////////////////////////
function setUp() public virtual override {
super.setUp();
......@@ -197,6 +218,10 @@ contract Deploy is Deployer {
transferDisputeGameFactoryOwnership();
}
////////////////////////////////////////////////////////////////
// High Level Deployment Functions //
////////////////////////////////////////////////////////////////
/// @notice Deploy all of the proxies
function deployProxies() public {
deployAddressManager();
......@@ -889,17 +914,6 @@ contract Deploy is Deployer {
ChainAssertions.checkProtocolVersions(_proxies(), cfg);
}
/// @notice Transfer ownership of the ProxyAdmin contract to the final system owner
function transferProxyAdminOwnership() public broadcast {
ProxyAdmin proxyAdmin = ProxyAdmin(mustGetAddress("ProxyAdmin"));
address owner = proxyAdmin.owner();
address safe = mustGetAddress("SystemOwnerSafe");
if (owner != safe) {
proxyAdmin.transferOwnership(safe);
console.log("ProxyAdmin ownership transferred to Safe at: %s", safe);
}
}
/// @notice Transfer ownership of the DisputeGameFactory contract to the final system owner
function transferDisputeGameFactoryOwnership() public onlyDevnet broadcast {
DisputeGameFactory disputeGameFactory = DisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment