Skip to content

Commit

Permalink
Add a CREATE2_SALT argument to DeploySafeRecovery script
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraSuegami committed Oct 2, 2024
1 parent 597486b commit 50ddea0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions script/DeploySafeRecovery.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ contract DeploySafeRecovery_Script is Script {
address dkimRegistry = vm.envOr("DKIM_REGISTRY", address(0));
address dkimRegistrySigner = vm.envOr("SIGNER", address(0));
address emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0));

address initialOwner = vm.addr(vm.envUint("PRIVATE_KEY"));
uint salt = vm.envOr("CREATE2_SALT", uint(0));

if (verifier == address(0)) {
Verifier verifierImpl = new Verifier();
Expand Down Expand Up @@ -68,15 +69,15 @@ contract DeploySafeRecovery_Script is Script {
EmailRecoveryUniversalFactory factory =
new EmailRecoveryUniversalFactory(verifier, emailAuthImpl);
(address module, address commandHandler) = factory.deployUniversalEmailRecoveryModule(
bytes32(uint256(0)),
bytes32(uint256(0)),
bytes32(salt),
bytes32(salt),
type(SafeRecoveryCommandHandler).creationCode,
dkimRegistry
);

address safe7579 = address(new Safe7579{ salt: bytes32(uint256(0)) }());
address safe7579 = address(new Safe7579{ salt: bytes32(salt) }());
address safe7579Launchpad =
address(new Safe7579Launchpad{ salt: bytes32(uint256(0)) }(entryPoint, registry));
address(new Safe7579Launchpad{ salt: bytes32(salt) }(entryPoint, registry));

console.log("Deployed Email Recovery Module at ", vm.toString(module));
console.log("Deployed Email Recovery Handler at ", vm.toString(commandHandler));
Expand Down

0 comments on commit 50ddea0

Please sign in to comment.