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"; ...@@ -54,6 +54,10 @@ import { Types } from "scripts/Types.sol";
contract Deploy is Deployer { contract Deploy is Deployer {
DeployConfig cfg; DeployConfig cfg;
////////////////////////////////////////////////////////////////
// Modifiers //
////////////////////////////////////////////////////////////////
/// @notice Modifier that wraps a function in broadcasting. /// @notice Modifier that wraps a function in broadcasting.
modifier broadcast() { modifier broadcast() {
vm.startBroadcast(); vm.startBroadcast();
...@@ -81,7 +85,9 @@ contract Deploy is Deployer { ...@@ -81,7 +85,9 @@ contract Deploy is Deployer {
} }
} }
/* --- getter functions --- */ ////////////////////////////////////////////////////////////////
// Accessors //
////////////////////////////////////////////////////////////////
/// @inheritdoc Deployer /// @inheritdoc Deployer
function name() public pure override returns (string memory name_) { function name() public pure override returns (string memory name_) {
...@@ -161,6 +167,21 @@ contract Deploy is Deployer { ...@@ -161,6 +167,21 @@ contract Deploy is Deployer {
_callViaSafe({ _target: proxyAdmin, _data: data }); _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 { function setUp() public virtual override {
super.setUp(); super.setUp();
...@@ -197,6 +218,10 @@ contract Deploy is Deployer { ...@@ -197,6 +218,10 @@ contract Deploy is Deployer {
transferDisputeGameFactoryOwnership(); transferDisputeGameFactoryOwnership();
} }
////////////////////////////////////////////////////////////////
// High Level Deployment Functions //
////////////////////////////////////////////////////////////////
/// @notice Deploy all of the proxies /// @notice Deploy all of the proxies
function deployProxies() public { function deployProxies() public {
deployAddressManager(); deployAddressManager();
...@@ -889,17 +914,6 @@ contract Deploy is Deployer { ...@@ -889,17 +914,6 @@ contract Deploy is Deployer {
ChainAssertions.checkProtocolVersions(_proxies(), cfg); 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 /// @notice Transfer ownership of the DisputeGameFactory contract to the final system owner
function transferDisputeGameFactoryOwnership() public onlyDevnet broadcast { function transferDisputeGameFactoryOwnership() public onlyDevnet broadcast {
DisputeGameFactory disputeGameFactory = DisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy")); 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