File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -72,4 +72,26 @@ contract GnosisScript is Script {
72
72
function addressToBytes32 (address addr ) internal pure returns (bytes32 ) {
73
73
return bytes32 (uint256 (uint160 (addr)));
74
74
}
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 = SafeSetup ({
84
+ owners: owners,
85
+ threshold: threshold,
86
+ to: address (0 ),
87
+ data: "" ,
88
+ fallbackHandler: fallbackHandler,
89
+ paymentToken: address (0 ),
90
+ payment: 0 ,
91
+ paymentReceiver: payable (address (0 )),
92
+ saltNonce: saltNonce
93
+ });
94
+
95
+ deploySafeInstance (factory, singleton, setup);
96
+ }
75
97
}
You can’t perform that action at this time.
0 commit comments