diff --git a/script/7579/EmailRecoveryModule/DeployEmailRecoveryModule.s.sol b/script/7579/EmailRecoveryModule/DeployEmailRecoveryModule.s.sol index 3caf184..8d30ff0 100644 --- a/script/7579/EmailRecoveryModule/DeployEmailRecoveryModule.s.sol +++ b/script/7579/EmailRecoveryModule/DeployEmailRecoveryModule.s.sol @@ -5,25 +5,24 @@ pragma solidity ^0.8.25; import { console } from "forge-std/console.sol"; import { EmailRecoveryCommandHandler } from "src/handlers/EmailRecoveryCommandHandler.sol"; -import { UserOverrideableDKIMRegistry } from "@zk-email/contracts/UserOverrideableDKIMRegistry.sol"; import { EmailAuth } from "@zk-email/ether-email-auth-contracts/src/EmailAuth.sol"; import { EmailRecoveryFactory } from "src/factories/EmailRecoveryFactory.sol"; import { OwnableValidator } from "src/test/OwnableValidator.sol"; import { BaseDeployScript } from "../../BaseDeployScript.s.sol"; contract DeployEmailRecoveryModuleScript is BaseDeployScript { - address verifier; - address dkim; - address emailAuthImpl; - address commandHandler; - uint256 minimumDelay; - address killSwitchAuthorizer; - address validatorAddr; + address public verifier; + address public dkim; + address public emailAuthImpl; + uint256 public minimumDelay; + address public killSwitchAuthorizer; + address public validatorAddr; + address public factory; - address initialOwner; - address dkimRegistrySigner; - uint256 dkimDelay; - uint256 salt; + address public initialOwner; + address public dkimRegistrySigner; + uint256 public dkimDelay; + uint256 public salt; function run() public override { super.run(); @@ -31,10 +30,10 @@ contract DeployEmailRecoveryModuleScript is BaseDeployScript { verifier = vm.envOr("VERIFIER", address(0)); dkim = vm.envOr("DKIM_REGISTRY", address(0)); emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0)); - commandHandler = vm.envOr("COMMAND_HANDLER", address(0)); minimumDelay = vm.envOr("MINIMUM_DELAY", uint256(0)); killSwitchAuthorizer = vm.envAddress("KILL_SWITCH_AUTHORIZER"); validatorAddr = vm.envOr("VALIDATOR", address(0)); + factory = vm.envOr("RECOVERY_FACTORY", address(0)); initialOwner = vm.addr(vm.envUint("PRIVATE_KEY")); dkimRegistrySigner = vm.envOr("DKIM_SIGNER", address(0)); @@ -62,15 +61,14 @@ contract DeployEmailRecoveryModuleScript is BaseDeployScript { console.log("OwnableValidator deployed at", validatorAddr); } - address _factory = vm.envOr("RECOVERY_FACTORY", address(0)); - if (_factory == address(0)) { - _factory = + if (factory == address(0)) { + factory = address(new EmailRecoveryFactory{ salt: bytes32(salt) }(verifier, emailAuthImpl)); - console.log("EmailRecoveryFactory deployed at", _factory); + console.log("EmailRecoveryFactory deployed at", factory); } - EmailRecoveryFactory factory = EmailRecoveryFactory(_factory); - (address module, address commandHandler) = factory.deployEmailRecoveryModule( + EmailRecoveryFactory emailRecoveryFactory = EmailRecoveryFactory(factory); + (address module, address commandHandler) = emailRecoveryFactory.deployEmailRecoveryModule( bytes32(uint256(0)), bytes32(uint256(0)), type(EmailRecoveryCommandHandler).creationCode, diff --git a/script/7579/EmailRecoveryModule/DeployEmailRecoveryModuleWithAccountHiding.s.sol b/script/7579/EmailRecoveryModule/DeployEmailRecoveryModuleWithAccountHiding.s.sol index 1a74417..e4d5a4d 100644 --- a/script/7579/EmailRecoveryModule/DeployEmailRecoveryModuleWithAccountHiding.s.sol +++ b/script/7579/EmailRecoveryModule/DeployEmailRecoveryModuleWithAccountHiding.s.sol @@ -6,25 +6,24 @@ pragma solidity ^0.8.25; import { console } from "forge-std/console.sol"; import { AccountHidingRecoveryCommandHandler } from "src/handlers/AccountHidingRecoveryCommandHandler.sol"; -import { UserOverrideableDKIMRegistry } from "@zk-email/contracts/UserOverrideableDKIMRegistry.sol"; import { EmailAuth } from "@zk-email/ether-email-auth-contracts/src/EmailAuth.sol"; import { EmailRecoveryFactory } from "src/factories/EmailRecoveryFactory.sol"; import { OwnableValidator } from "src/test/OwnableValidator.sol"; import { BaseDeployScript } from "../../BaseDeployScript.s.sol"; contract DeployEmailRecoveryModuleScript is BaseDeployScript { - address verifier; - address dkim; - address emailAuthImpl; - address commandHandler; - uint256 minimumDelay; - address killSwitchAuthorizer; - address validatorAddr; + address public verifier; + address public dkim; + address public emailAuthImpl; + uint256 public minimumDelay; + address public killSwitchAuthorizer; + address public validatorAddr; + address public factory; - address initialOwner; - address dkimRegistrySigner; - uint256 dkimDelay; - uint256 salt; + address public initialOwner; + address public dkimRegistrySigner; + uint256 public dkimDelay; + uint256 public salt; function run() public override { super.run(); @@ -32,10 +31,10 @@ contract DeployEmailRecoveryModuleScript is BaseDeployScript { verifier = vm.envOr("VERIFIER", address(0)); dkim = vm.envOr("DKIM_REGISTRY", address(0)); emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0)); - commandHandler = vm.envOr("COMMAND_HANDLER", address(0)); minimumDelay = vm.envOr("MINIMUM_DELAY", uint256(0)); killSwitchAuthorizer = vm.envAddress("KILL_SWITCH_AUTHORIZER"); validatorAddr = vm.envOr("VALIDATOR", address(0)); + factory = vm.envOr("RECOVERY_FACTORY", address(0)); initialOwner = vm.addr(vm.envUint("PRIVATE_KEY")); dkimRegistrySigner = vm.envOr("DKIM_SIGNER", address(0)); @@ -62,15 +61,14 @@ contract DeployEmailRecoveryModuleScript is BaseDeployScript { console.log("OwnableValidator deployed at", validatorAddr); } - address _factory = vm.envOr("RECOVERY_FACTORY", address(0)); - if (_factory == address(0)) { - _factory = + if (factory == address(0)) { + factory = address(new EmailRecoveryFactory{ salt: bytes32(salt) }(verifier, emailAuthImpl)); - console.log("EmailRecoveryFactory deployed at", _factory); + console.log("EmailRecoveryFactory deployed at", factory); } - EmailRecoveryFactory factory = EmailRecoveryFactory(_factory); - (address module, address commandHandler) = factory.deployEmailRecoveryModule( + EmailRecoveryFactory emailRecoveryFactory = EmailRecoveryFactory(factory); + (address module, address commandHandler) = emailRecoveryFactory.deployEmailRecoveryModule( bytes32(uint256(0)), bytes32(uint256(0)), type(AccountHidingRecoveryCommandHandler).creationCode, diff --git a/script/7579/UniversalEmailRecoveryModule/DeployUniversalEmailRecoveryModule.s.sol b/script/7579/UniversalEmailRecoveryModule/DeployUniversalEmailRecoveryModule.s.sol index e9142b0..66cd7f5 100644 --- a/script/7579/UniversalEmailRecoveryModule/DeployUniversalEmailRecoveryModule.s.sol +++ b/script/7579/UniversalEmailRecoveryModule/DeployUniversalEmailRecoveryModule.s.sol @@ -5,23 +5,22 @@ pragma solidity ^0.8.25; import { console } from "forge-std/console.sol"; import { EmailRecoveryCommandHandler } from "src/handlers/EmailRecoveryCommandHandler.sol"; -import { UserOverrideableDKIMRegistry } from "@zk-email/contracts/UserOverrideableDKIMRegistry.sol"; import { EmailAuth } from "@zk-email/ether-email-auth-contracts/src/EmailAuth.sol"; import { EmailRecoveryUniversalFactory } from "src/factories/EmailRecoveryUniversalFactory.sol"; import { BaseDeployScript } from "../../BaseDeployScript.s.sol"; contract DeployUniversalEmailRecoveryModuleScript is BaseDeployScript { - address verifier; - address dkim; - address emailAuthImpl; - address commandHandler; - uint256 minimumDelay; - address killSwitchAuthorizer; + address public verifier; + address public dkim; + address public emailAuthImpl; + uint256 public minimumDelay; + address public killSwitchAuthorizer; + address public factory; - address initialOwner; - address dkimRegistrySigner; - uint256 dkimDelay; - uint256 salt; + address public initialOwner; + address public dkimRegistrySigner; + uint256 public dkimDelay; + uint256 public salt; function run() public override { super.run(); @@ -29,9 +28,9 @@ contract DeployUniversalEmailRecoveryModuleScript is BaseDeployScript { verifier = vm.envOr("VERIFIER", address(0)); dkim = vm.envOr("DKIM_REGISTRY", address(0)); emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0)); - commandHandler = vm.envOr("COMMAND_HANDLER", address(0)); minimumDelay = vm.envOr("MINIMUM_DELAY", uint256(0)); killSwitchAuthorizer = vm.envAddress("KILL_SWITCH_AUTHORIZER"); + factory = vm.envOr("RECOVERY_FACTORY", address(0)); initialOwner = vm.addr(vm.envUint("PRIVATE_KEY")); dkimRegistrySigner = vm.envOr("DKIM_SIGNER", address(0)); @@ -53,16 +52,17 @@ contract DeployUniversalEmailRecoveryModuleScript is BaseDeployScript { console.log("EmailAuth implemenation deployed at", emailAuthImpl); } - address _factory = vm.envOr("RECOVERY_FACTORY", address(0)); - if (_factory == address(0)) { - _factory = address( + if (factory == address(0)) { + factory = address( new EmailRecoveryUniversalFactory{ salt: bytes32(salt) }(verifier, emailAuthImpl) ); - console.log("EmailRecoveryUniversalFactory deployed at", _factory); + console.log("EmailRecoveryUniversalFactory deployed at", factory); } - EmailRecoveryUniversalFactory factory = EmailRecoveryUniversalFactory(_factory); - (address module, address commandHandler) = factory.deployUniversalEmailRecoveryModule( + EmailRecoveryUniversalFactory emailRecoveryUniversalFactory = + EmailRecoveryUniversalFactory(factory); + (address module, address commandHandler) = emailRecoveryUniversalFactory + .deployUniversalEmailRecoveryModule( bytes32(uint256(0)), bytes32(uint256(0)), type(EmailRecoveryCommandHandler).creationCode, diff --git a/script/7579/UniversalEmailRecoveryModule/DeployUniversalEmailRecoveryModuleWithAccountHiding.s.sol b/script/7579/UniversalEmailRecoveryModule/DeployUniversalEmailRecoveryModuleWithAccountHiding.s.sol index 87adba0..a13f065 100644 --- a/script/7579/UniversalEmailRecoveryModule/DeployUniversalEmailRecoveryModuleWithAccountHiding.s.sol +++ b/script/7579/UniversalEmailRecoveryModule/DeployUniversalEmailRecoveryModuleWithAccountHiding.s.sol @@ -6,23 +6,22 @@ pragma solidity ^0.8.25; import { console } from "forge-std/console.sol"; import { AccountHidingRecoveryCommandHandler } from "src/handlers/AccountHidingRecoveryCommandHandler.sol"; -import { UserOverrideableDKIMRegistry } from "@zk-email/contracts/UserOverrideableDKIMRegistry.sol"; import { EmailAuth } from "@zk-email/ether-email-auth-contracts/src/EmailAuth.sol"; import { EmailRecoveryUniversalFactory } from "src/factories/EmailRecoveryUniversalFactory.sol"; import { BaseDeployScript } from "../../BaseDeployScript.s.sol"; contract DeployUniversalEmailRecoveryModuleScript is BaseDeployScript { - address verifier; - address dkim; - address emailAuthImpl; - address commandHandler; - uint256 minimumDelay; - address killSwitchAuthorizer; + address public verifier; + address public dkim; + address public emailAuthImpl; + uint256 public minimumDelay; + address public killSwitchAuthorizer; + address public factory; - address initialOwner; - address dkimRegistrySigner; - uint256 dkimDelay; - uint256 salt; + address public initialOwner; + address public dkimRegistrySigner; + uint256 public dkimDelay; + uint256 public salt; function run() public override { super.run(); @@ -30,9 +29,9 @@ contract DeployUniversalEmailRecoveryModuleScript is BaseDeployScript { verifier = vm.envOr("VERIFIER", address(0)); dkim = vm.envOr("DKIM_REGISTRY", address(0)); emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0)); - commandHandler = vm.envOr("COMMAND_HANDLER", address(0)); minimumDelay = vm.envOr("MINIMUM_DELAY", uint256(0)); killSwitchAuthorizer = vm.envAddress("KILL_SWITCH_AUTHORIZER"); + factory = vm.envOr("RECOVERY_FACTORY", address(0)); initialOwner = vm.addr(vm.envUint("PRIVATE_KEY")); dkimRegistrySigner = vm.envOr("DKIM_SIGNER", address(0)); @@ -54,16 +53,17 @@ contract DeployUniversalEmailRecoveryModuleScript is BaseDeployScript { console.log("EmailAuth implemenation deployed at", emailAuthImpl); } - address _factory = vm.envOr("RECOVERY_FACTORY", address(0)); - if (_factory == address(0)) { - _factory = address( + if (factory == address(0)) { + factory = address( new EmailRecoveryUniversalFactory{ salt: bytes32(salt) }(verifier, emailAuthImpl) ); - console.log("EmailRecoveryUniversalFactory deployed at", _factory); + console.log("EmailRecoveryUniversalFactory deployed at", factory); } - EmailRecoveryUniversalFactory factory = EmailRecoveryUniversalFactory(_factory); - (address module, address commandHandler) = factory.deployUniversalEmailRecoveryModule( + EmailRecoveryUniversalFactory emailRecoveryUniversalFactory = + EmailRecoveryUniversalFactory(factory); + (address module, address commandHandler) = emailRecoveryUniversalFactory + .deployUniversalEmailRecoveryModule( bytes32(uint256(0)), bytes32(uint256(0)), type(AccountHidingRecoveryCommandHandler).creationCode, diff --git a/script/Safe/DeploySafeNativeRecovery.s.sol b/script/Safe/DeploySafeNativeRecovery.s.sol index 57b945c..367181b 100644 --- a/script/Safe/DeploySafeNativeRecovery.s.sol +++ b/script/Safe/DeploySafeNativeRecovery.s.sol @@ -4,24 +4,23 @@ pragma solidity ^0.8.25; /* solhint-disable no-console, gas-custom-errors */ import { console } from "forge-std/console.sol"; -import { UserOverrideableDKIMRegistry } from "@zk-email/contracts/UserOverrideableDKIMRegistry.sol"; import { EmailAuth } from "@zk-email/ether-email-auth-contracts/src/EmailAuth.sol"; import { SafeRecoveryCommandHandler } from "src/handlers/SafeRecoveryCommandHandler.sol"; import { SafeEmailRecoveryModule } from "src/modules/SafeEmailRecoveryModule.sol"; import { BaseDeployScript } from "../BaseDeployScript.s.sol"; contract DeploySafeNativeRecovery_Script is BaseDeployScript { - address verifier; - address dkim; - address emailAuthImpl; - address commandHandler; - uint256 minimumDelay; - address killSwitchAuthorizer; + address public verifier; + address public dkim; + address public emailAuthImpl; + address public commandHandler; + uint256 public minimumDelay; + address public killSwitchAuthorizer; - address initialOwner; - address dkimRegistrySigner; - uint256 dkimDelay; - uint256 salt; + address public initialOwner; + address public dkimRegistrySigner; + uint256 public dkimDelay; + uint256 public salt; function run() public override { super.run(); diff --git a/script/Safe/DeploySafeNativeRecoveryWithAccountHiding.s.sol b/script/Safe/DeploySafeNativeRecoveryWithAccountHiding.s.sol index 5156d8b..5c6db31 100644 --- a/script/Safe/DeploySafeNativeRecoveryWithAccountHiding.s.sol +++ b/script/Safe/DeploySafeNativeRecoveryWithAccountHiding.s.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.25; /* solhint-disable no-console, gas-custom-errors */ import { console } from "forge-std/console.sol"; -import { UserOverrideableDKIMRegistry } from "@zk-email/contracts/UserOverrideableDKIMRegistry.sol"; import { EmailAuth } from "@zk-email/ether-email-auth-contracts/src/EmailAuth.sol"; import { AccountHidingRecoveryCommandHandler } from "src/handlers/AccountHidingRecoveryCommandHandler.sol"; @@ -12,17 +11,17 @@ import { SafeEmailRecoveryModule } from "src/modules/SafeEmailRecoveryModule.sol import { BaseDeployScript } from "../BaseDeployScript.s.sol"; contract DeploySafeNativeRecovery_Script is BaseDeployScript { - address verifier; - address dkim; - address emailAuthImpl; - address commandHandler; - uint256 minimumDelay; - address killSwitchAuthorizer; + address public verifier; + address public dkim; + address public emailAuthImpl; + address public commandHandler; + uint256 public minimumDelay; + address public killSwitchAuthorizer; - address initialOwner; - address dkimRegistrySigner; - uint256 dkimDelay; - uint256 salt; + address public initialOwner; + address public dkimRegistrySigner; + uint256 public dkimDelay; + uint256 public salt; function run() public override { super.run(); diff --git a/script/Safe7579/DeploySafeRecovery.s.sol b/script/Safe7579/DeploySafeRecovery.s.sol index e2df954..36fb9d5 100644 --- a/script/Safe7579/DeploySafeRecovery.s.sol +++ b/script/Safe7579/DeploySafeRecovery.s.sol @@ -7,24 +7,23 @@ import { console } from "forge-std/console.sol"; import { SafeRecoveryCommandHandler } from "src/handlers/SafeRecoveryCommandHandler.sol"; import { EmailRecoveryUniversalFactory } from "src/factories/EmailRecoveryUniversalFactory.sol"; import { EmailAuth } from "@zk-email/ether-email-auth-contracts/src/EmailAuth.sol"; -import { UserOverrideableDKIMRegistry } from "@zk-email/contracts/UserOverrideableDKIMRegistry.sol"; import { BaseDeployScript } from "../BaseDeployScript.s.sol"; // 1. `source .env` // 2. `forge script --chain sepolia script/DeploySafeRecovery.s.sol:DeploySafeRecovery_Script // --rpc-url $BASE_SEPOLIA_RPC_URL --broadcast -vvvv` contract DeploySafeRecovery_Script is BaseDeployScript { - address verifier; - address dkim; - address emailAuthImpl; - address commandHandler; - uint256 minimumDelay; - address killSwitchAuthorizer; + address public verifier; + address public dkim; + address public emailAuthImpl; + uint256 public minimumDelay; + address public killSwitchAuthorizer; + address public factory; - address initialOwner; - address dkimRegistrySigner; - uint256 dkimDelay; - uint256 salt; + address public initialOwner; + address public dkimRegistrySigner; + uint256 public dkimDelay; + uint256 public salt; function run() public override { super.run(); @@ -33,9 +32,9 @@ contract DeploySafeRecovery_Script is BaseDeployScript { verifier = vm.envOr("VERIFIER", address(0)); dkim = vm.envOr("DKIM_REGISTRY", address(0)); emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0)); - commandHandler = vm.envOr("COMMAND_HANDLER", address(0)); minimumDelay = vm.envOr("MINIMUM_DELAY", uint256(0)); killSwitchAuthorizer = vm.envAddress("KILL_SWITCH_AUTHORIZER"); + factory = vm.envOr("RECOVERY_FACTORY", address(0)); initialOwner = vm.addr(vm.envUint("PRIVATE_KEY")); dkimRegistrySigner = vm.envOr("DKIM_SIGNER", address(0)); @@ -57,9 +56,17 @@ contract DeploySafeRecovery_Script is BaseDeployScript { console.log("EmailAuth implemenation deployed at", emailAuthImpl); } - EmailRecoveryUniversalFactory factory = - new EmailRecoveryUniversalFactory{ salt: bytes32(salt) }(verifier, emailAuthImpl); - (address module, address commandHandler) = factory.deployUniversalEmailRecoveryModule( + if (factory == address(0)) { + factory = address( + new EmailRecoveryUniversalFactory{ salt: bytes32(salt) }(verifier, emailAuthImpl) + ); + console.log("EmailRecoveryUniversalFactory deployed at", factory); + } + + EmailRecoveryUniversalFactory emailRecoveryUniversalFactory = + EmailRecoveryUniversalFactory(factory); + (address module, address commandHandler) = emailRecoveryUniversalFactory + .deployUniversalEmailRecoveryModule( bytes32(salt), bytes32(salt), type(SafeRecoveryCommandHandler).creationCode, diff --git a/script/Safe7579/DeploySafeRecoveryWithAccountHiding.s.sol b/script/Safe7579/DeploySafeRecoveryWithAccountHiding.s.sol index 51cac6e..1245f31 100644 --- a/script/Safe7579/DeploySafeRecoveryWithAccountHiding.s.sol +++ b/script/Safe7579/DeploySafeRecoveryWithAccountHiding.s.sol @@ -15,17 +15,17 @@ import { BaseDeployScript } from "../BaseDeployScript.s.sol"; // script/DeploySafeRecoveryWithAccountHiding.s.sol:DeploySafeRecoveryWithAccountHiding_Script // --rpc-url $RPC_URL --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY -vvvv` contract DeploySafeRecoveryWithAccountHiding_Script is BaseDeployScript { - address verifier; - address dkim; - address emailAuthImpl; - address commandHandler; - uint256 minimumDelay; - address killSwitchAuthorizer; + address public verifier; + address public dkim; + address public emailAuthImpl; + uint256 public minimumDelay; + address public killSwitchAuthorizer; + address public factory; - address initialOwner; - address dkimRegistrySigner; - uint256 dkimDelay; - uint256 salt; + address public initialOwner; + address public dkimRegistrySigner; + uint256 public dkimDelay; + uint256 public salt; function run() public override { super.run(); @@ -34,9 +34,9 @@ contract DeploySafeRecoveryWithAccountHiding_Script is BaseDeployScript { verifier = vm.envOr("VERIFIER", address(0)); dkim = vm.envOr("DKIM_REGISTRY", address(0)); emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0)); - commandHandler = vm.envOr("COMMAND_HANDLER", address(0)); minimumDelay = vm.envOr("MINIMUM_DELAY", uint256(0)); killSwitchAuthorizer = vm.envAddress("KILL_SWITCH_AUTHORIZER"); + factory = vm.envOr("RECOVERY_FACTORY", address(0)); initialOwner = vm.addr(vm.envUint("PRIVATE_KEY")); dkimRegistrySigner = vm.envOr("DKIM_SIGNER", address(0)); @@ -58,9 +58,17 @@ contract DeploySafeRecoveryWithAccountHiding_Script is BaseDeployScript { console.log("EmailAuth implemenation deployed at", emailAuthImpl); } - EmailRecoveryUniversalFactory factory = - new EmailRecoveryUniversalFactory{ salt: bytes32(salt) }(verifier, emailAuthImpl); - (address module, address commandHandler) = factory.deployUniversalEmailRecoveryModule( + if (factory == address(0)) { + factory = address( + new EmailRecoveryUniversalFactory{ salt: bytes32(salt) }(verifier, emailAuthImpl) + ); + console.log("EmailRecoveryUniversalFactory deployed at", factory); + } + + EmailRecoveryUniversalFactory emailRecoveryUniversalFactory = + EmailRecoveryUniversalFactory(factory); + (address module, address commandHandler) = emailRecoveryUniversalFactory + .deployUniversalEmailRecoveryModule( bytes32(uint256(0)), bytes32(uint256(0)), type(AccountHidingRecoveryCommandHandler).creationCode, diff --git a/src/test/OwnableValidator.sol b/src/test/OwnableValidator.sol index 8f78521..02640c7 100644 --- a/src/test/OwnableValidator.sol +++ b/src/test/OwnableValidator.sol @@ -77,12 +77,12 @@ contract OwnableValidator is ERC7579ValidatorBase { } function validateSignatureWithData( - bytes32 hash, - bytes calldata signature, - bytes calldata data + bytes32, /*hash*/ + bytes calldata, /*signature*/ + bytes calldata /*data*/ ) external - view + pure override returns (bool) { diff --git a/test/unit/EmailRecoveryManager/deInitRecoveryModule.t.sol b/test/unit/EmailRecoveryManager/deInitRecoveryModule.t.sol index c13f05e..d4208e3 100644 --- a/test/unit/EmailRecoveryManager/deInitRecoveryModule.t.sol +++ b/test/unit/EmailRecoveryManager/deInitRecoveryModule.t.sol @@ -12,7 +12,6 @@ contract EmailRecoveryManager_deInitRecoveryModule_Test is UnitBase { super.setUp(); } - function test_DeInitRecoveryModule_RevertWhen_RecoveryInProcess() public { acceptGuardian(accountAddress1, guardians1[0], emailRecoveryModuleAddress); acceptGuardian(accountAddress1, guardians1[1], emailRecoveryModuleAddress); @@ -89,7 +88,6 @@ contract EmailRecoveryManager_deInitRecoveryModule_Test is UnitBase { assertFalse(isActivated); } - function test_DeInitRecoveryModule_SucceedsWhen_KillSwitchEnabled() public { acceptGuardian(accountAddress1, guardians1[0], emailRecoveryModuleAddress); acceptGuardian(accountAddress1, guardians1[1], emailRecoveryModuleAddress); diff --git a/test/unit/handlers/AccountHidingRecoveryCommandHandler/extractRecoveredAccountFromRecoveryCommand.t.sol b/test/unit/handlers/AccountHidingRecoveryCommandHandler/extractRecoveredAccountFromRecoveryCommand.t.sol index f42ce98..29aeee4 100644 --- a/test/unit/handlers/AccountHidingRecoveryCommandHandler/extractRecoveredAccountFromRecoveryCommand.t.sol +++ b/test/unit/handlers/AccountHidingRecoveryCommandHandler/extractRecoveredAccountFromRecoveryCommand.t.sol @@ -18,7 +18,7 @@ contract AccountHidingRecoveryCommandHandler_extractRecoveredAccountFromRecovery accountHidingRecoveryCommandHandler = new AccountHidingRecoveryCommandHandler(); } - function test_ExtractRecoveredAccountFromRecoveryCommand_FailsWhenHashNotStored() public { + function test_ExtractRecoveredAccountFromRecoveryCommand_FailsWhenHashNotStored() public view { bytes32 accountHash = keccak256(abi.encodePacked(accountAddress1)); string memory accountHashString = uint256(accountHash).toHexString(32); string memory recoveryDataHashString = uint256(recoveryDataHash).toHexString(32); diff --git a/test/unit/modules/EmailRecoveryModule/name.t.sol b/test/unit/modules/EmailRecoveryModule/name.t.sol index 736f020..f6a69d7 100644 --- a/test/unit/modules/EmailRecoveryModule/name.t.sol +++ b/test/unit/modules/EmailRecoveryModule/name.t.sol @@ -8,7 +8,7 @@ contract EmailRecoveryModule_name_Test is EmailRecoveryModuleBase { super.setUp(); } - function test_Name_ReturnsName() public { + function test_Name_ReturnsName() public view { string memory expectedName = "ZKEmail.EmailRecoveryModule"; string memory actualName = emailRecoveryModule.name(); assertEq(actualName, expectedName, "Module name should match expected value"); diff --git a/test/unit/modules/EmailRecoveryModule/version.t.sol b/test/unit/modules/EmailRecoveryModule/version.t.sol index 617bbe6..4b221cb 100644 --- a/test/unit/modules/EmailRecoveryModule/version.t.sol +++ b/test/unit/modules/EmailRecoveryModule/version.t.sol @@ -8,7 +8,7 @@ contract EmailRecoveryModule_version_Test is EmailRecoveryModuleBase { super.setUp(); } - function test_Version_ReturnsVersion() public { + function test_Version_ReturnsVersion() public view { string memory expectedVersion = "1.0.0"; string memory actualVersion = emailRecoveryModule.version(); assertEq(actualVersion, expectedVersion, "Module version should match expected value"); diff --git a/test/unit/modules/UniversalEmailRecoveryModule/isModuleType.t.sol b/test/unit/modules/UniversalEmailRecoveryModule/isModuleType.t.sol index bd435c7..8958c65 100644 --- a/test/unit/modules/UniversalEmailRecoveryModule/isModuleType.t.sol +++ b/test/unit/modules/UniversalEmailRecoveryModule/isModuleType.t.sol @@ -9,7 +9,7 @@ contract UniversalEmailRecoveryModule_isModuleType_Test is UnitBase { super.setUp(); } - function test_IsModuleType_ReturnsModuleType() public { + function test_IsModuleType_ReturnsModuleType() public view { // Verify that the module type is correct bool isExecutor = emailRecoveryModule.isModuleType(MODULE_TYPE_EXECUTOR); assertTrue(isExecutor, "Should be an executor module"); diff --git a/test/unit/modules/UniversalEmailRecoveryModule/name.t.sol b/test/unit/modules/UniversalEmailRecoveryModule/name.t.sol index 8cd8e67..3ebc34d 100644 --- a/test/unit/modules/UniversalEmailRecoveryModule/name.t.sol +++ b/test/unit/modules/UniversalEmailRecoveryModule/name.t.sol @@ -8,7 +8,7 @@ contract UniversalEmailRecoveryModule_name_Test is UnitBase { super.setUp(); } - function test_Name_ReturnsName() public { + function test_Name_ReturnsName() public view { string memory expectedName = "ZKEmail.UniversalEmailRecoveryModule"; string memory actualName = emailRecoveryModule.name(); assertEq(actualName, expectedName, "Module name should match expected value"); diff --git a/test/unit/modules/UniversalEmailRecoveryModule/version.t.sol b/test/unit/modules/UniversalEmailRecoveryModule/version.t.sol index 65e78d5..f50b0c5 100644 --- a/test/unit/modules/UniversalEmailRecoveryModule/version.t.sol +++ b/test/unit/modules/UniversalEmailRecoveryModule/version.t.sol @@ -8,7 +8,7 @@ contract UniversalEmailRecoveryModule_version_Test is UnitBase { super.setUp(); } - function test_Version_ReturnsVersion() public { + function test_Version_ReturnsVersion() public view { string memory expectedVersion = "1.0.0"; string memory actualVersion = emailRecoveryModule.version(); assertEq(actualVersion, expectedVersion, "Module version should match expected value");