Commit 55d8a35e authored by Maurelian's avatar Maurelian Committed by GitHub

ctb: Enable setting custom names in deploySafe() (#10364)

* ctb: Enable setting custom names in deploySafe()

* Fix formatting

* ctb: fix spacing on deploySafe log
parent 322bf55a
...@@ -273,7 +273,7 @@ contract Deploy is Deployer { ...@@ -273,7 +273,7 @@ contract Deploy is Deployer {
/// @notice Internal function containing the deploy logic. /// @notice Internal function containing the deploy logic.
function _run() internal { function _run() internal {
console.log("start of L1 Deploy!"); console.log("start of L1 Deploy!");
deploySafe(); deploySafe("SystemOwnerSafe");
console.log("deployed Safe!"); console.log("deployed Safe!");
setupSuperchain(); setupSuperchain();
console.log("set up superchain!"); console.log("set up superchain!");
...@@ -414,7 +414,7 @@ contract Deploy is Deployer { ...@@ -414,7 +414,7 @@ contract Deploy is Deployer {
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
/// @notice Deploy the Safe /// @notice Deploy the Safe
function deploySafe() public broadcast returns (address addr_) { function deploySafe(string memory _name) public broadcast returns (address addr_) {
console.log("Deploying Safe"); console.log("Deploying Safe");
(SafeProxyFactory safeProxyFactory, Safe safeSingleton) = _getSafeFactory(); (SafeProxyFactory safeProxyFactory, Safe safeSingleton) = _getSafeFactory();
...@@ -426,8 +426,11 @@ contract Deploy is Deployer { ...@@ -426,8 +426,11 @@ contract Deploy is Deployer {
); );
address safe = address(safeProxyFactory.createProxyWithNonce(address(safeSingleton), initData, block.timestamp)); address safe = address(safeProxyFactory.createProxyWithNonce(address(safeSingleton), initData, block.timestamp));
save("SystemOwnerSafe", address(safe)); save(_name, address(safe));
console.log("New SystemOwnerSafe deployed at %s", address(safe)); console.log(
string.concat("New safe: ", _name, " deployed at %s\n Note that this safe is owned by the deployer key"),
address(safe)
);
addr_ = safe; addr_ = safe;
} }
......
...@@ -5,7 +5,7 @@ import { Deploy } from "scripts/Deploy.s.sol"; ...@@ -5,7 +5,7 @@ import { Deploy } from "scripts/Deploy.s.sol";
contract KontrolDeployment is Deploy { contract KontrolDeployment is Deploy {
function runKontrolDeployment() public stateDiff { function runKontrolDeployment() public stateDiff {
deploySafe(); deploySafe("SystemOwnerSafe");
setupSuperchain(); setupSuperchain();
// deployProxies(); // deployProxies();
......
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