Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions script/DeployGnosisSafe.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}