Skip to content

Commit fbad75e

Browse files
authored
add deployRollupSafeInstance function (#87)
* add deployRollupSafeInstance function * address nit style changes
1 parent d8a6deb commit fbad75e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

script/DeployGnosisSafe.s.sol

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,20 @@ contract GnosisScript is Script {
7272
function addressToBytes32(address addr) internal pure returns (bytes32) {
7373
return bytes32(uint256(uint160(addr)));
7474
}
75+
76+
// deploy a safe instance to the rollup with the given owners, threshold, and saltnonce.
77+
// populates the address of the gnosis factory, singleton, and fallback handler.
78+
function deployRollupSafeInstance(address[] memory owners, uint256 threshold, uint256 saltNonce) public {
79+
address factory = 0x8ff5C1D5233CA055cD536b2b87294d17f9160801;
80+
address singleton = 0x2f2965efaCFc64Fb85dF1902260eB25C0c996195;
81+
address fallbackHandler = 0xe59838EB7f251489b50940BD640326215420B936;
82+
83+
SafeSetup memory setup;
84+
setup.owners = owners;
85+
setup.threshold = threshold;
86+
setup.fallbackHandler = fallbackHandler;
87+
setup.saltNonce = saltNonce;
88+
89+
deploySafeInstance(factory, singleton, setup);
90+
}
7591
}

0 commit comments

Comments
 (0)