Skip to content

Commit

Permalink
Fix deployment bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGuilding committed Aug 7, 2024
1 parent cc5c478 commit bb86bf5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions script/ComputeSafeRecoveryCalldata.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import { Script } from "forge-std/Script.sol";
import { console } from "forge-std/console.sol";

contract ComputeSafeRecoveryCalldataScript is Script {
function run() public {
address oldOwner = vm.envAddress("OLD_OWNER");
address newOwner = vm.envAddress("NEW_OWNER");
address previousOwnerInLinkedList = address(1);

bytes memory recoveryCalldata = abi.encodeWithSignature(
"swapOwner(address,address,address)", previousOwnerInLinkedList, oldOwner, newOwner
);

console.log("recoveryCalldata", vm.toString(recoveryCalldata));
}
}
4 changes: 2 additions & 2 deletions script/DeploySafeNativeRecovery.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contract DeploySafeNativeRecovery_Script is Script {
vm.startBroadcast(vm.envUint("PRIVATE_KEY"));
address verifier = vm.envOr("VERIFIER", address(0));
address dkimRegistry = vm.envOr("DKIM_REGISTRY", address(0));
address dkimRegistrySigner = vm.envOr("SIGNER", address(0));
address dkimRegistrySigner = vm.envOr("DKIM_SIGNER", address(0));
address emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0));

if (verifier == address(0)) {
Expand All @@ -33,7 +33,7 @@ contract DeploySafeNativeRecovery_Script is Script {
console.log("Deployed Email Auth at", emailAuthImpl);
}

address module = address(new SafeEmailRecoveryModule(verifier, emailAuthImpl, dkimRegistry));
address module = address(new SafeEmailRecoveryModule(verifier, dkimRegistry, emailAuthImpl));

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

Expand Down

0 comments on commit bb86bf5

Please sign in to comment.