From c765ef22fa9680ee07c3dcb14b26b2e4e27aa431 Mon Sep 17 00:00:00 2001 From: dylan Date: Thu, 11 Sep 2025 11:15:04 -0400 Subject: [PATCH 1/2] add deployRollupSafeInstance function --- script/DeployGnosisSafe.s.sol | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/script/DeployGnosisSafe.s.sol b/script/DeployGnosisSafe.s.sol index 4459335..5dd5bbe 100644 --- a/script/DeployGnosisSafe.s.sol +++ b/script/DeployGnosisSafe.s.sol @@ -72,4 +72,26 @@ contract GnosisScript is Script { function addressToBytes32(address addr) internal pure returns (bytes32) { return bytes32(uint256(uint160(addr))); } + + // deploy a safe instance to the rollup with the given owners, threshold, and saltnonce. + // populates the address of the gnosis factory, singleton, and fallback handler. + function deployRollupSafeInstance(address[] memory owners, uint256 threshold, uint256 saltNonce) public { + address factory = 0x8ff5C1D5233CA055cD536b2b87294d17f9160801; + address singleton = 0x2f2965efaCFc64Fb85dF1902260eB25C0c996195; + address fallbackHandler = 0xe59838EB7f251489b50940BD640326215420B936; + + SafeSetup memory setup = SafeSetup({ + owners: owners, + threshold: threshold, + to: address(0), + data: "", + fallbackHandler: fallbackHandler, + paymentToken: address(0), + payment: 0, + paymentReceiver: payable(address(0)), + saltNonce: saltNonce + }); + + deploySafeInstance(factory, singleton, setup); + } } From a964c0d11c049534993b46ddfd4233cef35a4147 Mon Sep 17 00:00:00 2001 From: dylan Date: Mon, 22 Sep 2025 13:14:15 -0600 Subject: [PATCH 2/2] address nit style changes --- script/DeployGnosisSafe.s.sol | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/script/DeployGnosisSafe.s.sol b/script/DeployGnosisSafe.s.sol index 5dd5bbe..24ced90 100644 --- a/script/DeployGnosisSafe.s.sol +++ b/script/DeployGnosisSafe.s.sol @@ -80,17 +80,11 @@ contract GnosisScript is Script { address singleton = 0x2f2965efaCFc64Fb85dF1902260eB25C0c996195; address fallbackHandler = 0xe59838EB7f251489b50940BD640326215420B936; - SafeSetup memory setup = SafeSetup({ - owners: owners, - threshold: threshold, - to: address(0), - data: "", - fallbackHandler: fallbackHandler, - paymentToken: address(0), - payment: 0, - paymentReceiver: payable(address(0)), - saltNonce: saltNonce - }); + SafeSetup memory setup; + setup.owners = owners; + setup.threshold = threshold; + setup.fallbackHandler = fallbackHandler; + setup.saltNonce = saltNonce; deploySafeInstance(factory, singleton, setup); }