From 577593098d3eb923032f43dedcb2118a0dd1f99f Mon Sep 17 00:00:00 2001 From: SoraSuegami Date: Thu, 12 Sep 2024 16:14:27 +0900 Subject: [PATCH] Import ether-email-auth as npm package --- package.json | 4 +- pnpm-lock.yaml | 75 ++++++++++++------- remappings.txt | 2 +- script/Deploy7579TestAccount.s.sol | 3 +- script/DeployEmailRecoveryModule.s.sol | 9 +-- script/DeploySafeNativeRecovery.s.sol | 9 +-- script/DeploySafeRecovery.s.sol | 9 +-- .../DeployUniversalEmailRecoveryModule.s.sol | 9 +-- src/EmailRecoveryManager.sol | 7 +- .../EmailRecoveryManager.integration.t.sol | 2 +- test/integration/IntegrationBase.t.sol | 5 +- .../EmailRecoveryModule.t.sol | 4 +- .../EmailRecoveryModuleBase.t.sol | 8 +- .../UniversalEmailRecoveryModule.t.sol | 2 +- .../UniversalEmailRecoveryModuleBase.t.sol | 8 +- .../SafeRecovery/SafeIntegrationBase.t.sol | 4 +- .../SafeNativeIntegrationBase.t.sol | 4 +- .../SafeRecoveryNativeModule.t.sol | 2 +- test/unit/SafeUnitBase.t.sol | 4 +- test/unit/UnitBase.t.sol | 11 +-- .../EmailRecoveryModuleBase.t.sol | 11 +-- 21 files changed, 94 insertions(+), 98 deletions(-) diff --git a/package.json b/package.json index 2efe25dc..c28cd186 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zk-email/email-recovery", - "version": "0.0.1", + "version": "0.0.2", "description": "Smart account module and related contracts to enable email recovery for validators", "license": "MIT", "author": { @@ -29,7 +29,7 @@ "@openzeppelin/contracts-upgradeable": "5.0.1", "@rhinestone/modulekit": "github:rhinestonewtf/modulekit", "@zk-email/contracts": "6.0.3", - "@zk-email/ether-email-auth": "github:zkemail/ether-email-auth#feat/body-parsing-with-audit-fix", + "@zk-email/ether-email-auth-contracts": "0.0.1-preview", "email-wallet-sdk": "github:zkemail/email-wallet-sdk", "erc7579-implementation": "github:erc7579/erc7579-implementation", "solidity-stringutils": "github:Arachnid/solidity-stringutils" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 42db6d06..9685336d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,9 +20,9 @@ importers: '@zk-email/contracts': specifier: 6.0.3 version: 6.0.3 - '@zk-email/ether-email-auth': - specifier: github:zkemail/ether-email-auth#feat/body-parsing-with-audit-fix - version: https://codeload.github.com/zkemail/ether-email-auth/tar.gz/3fb09045688c9b5d291efb03bf1e785ec424aeff + '@zk-email/ether-email-auth-contracts': + specifier: 0.0.1-preview + version: 0.0.1-preview email-wallet-sdk: specifier: github:zkemail/email-wallet-sdk version: https://codeload.github.com/zkemail/email-wallet-sdk/tar.gz/a8c200e4855a81adc7b9493afa92a898ffcb8c56(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) @@ -159,6 +159,12 @@ packages: peerDependencies: ethers: ^5.1.4 + '@matterlabs/zksync-contracts@0.6.1': + resolution: {integrity: sha512-+hucLw4DhGmTmQlXOTEtpboYCaOm/X2VJcWmnW4abNcOgQXEHX+mTxQrxEfPjIZT0ZE6z5FTUrOK9+RgUZwBMQ==} + peerDependencies: + '@openzeppelin/contracts': 4.6.0 + '@openzeppelin/contracts-upgradeable': 4.6.0 + '@metamask/eth-sig-util@4.0.1': resolution: {integrity: sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==} engines: {node: '>=12.0.0'} @@ -499,10 +505,11 @@ packages: '@zk-email/contracts@6.0.3': resolution: {integrity: sha512-nPSG27431Cz5bzPlR/ltn7qa9k+Joc/6LDHUz+JeFWEP/ff9VnzK11P0ay5qdX14qpQ647varPdxGtulosUtxw==} - '@zk-email/ether-email-auth@https://codeload.github.com/zkemail/ether-email-auth/tar.gz/3fb09045688c9b5d291efb03bf1e785ec424aeff': - resolution: {tarball: https://codeload.github.com/zkemail/ether-email-auth/tar.gz/3fb09045688c9b5d291efb03bf1e785ec424aeff} - version: 1.0.0 - engines: {node: '18'} + '@zk-email/contracts@6.1.5': + resolution: {integrity: sha512-1RW3dpYGBQXjmIlcTGMtYsux7FQoR1MezA0D0pssrNEaCO2CuQd6oAxJLpbCxFQWPbujLKn8PiEVcjP+eiGvVw==} + + '@zk-email/ether-email-auth-contracts@0.0.1-preview': + resolution: {integrity: sha512-lyXq6ELoNVDv5oAuxg98NxLZgvf8K0qRFdLca/ttJQNeGs3fxDvrAZL47SZH6qR5OEl1M5L0ORu9afJpfP8JVg==} abbrev@1.0.9: resolution: {integrity: sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==} @@ -1029,14 +1036,14 @@ packages: debug: optional: true - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c: - resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c} - version: 1.9.2 - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/ae570fec082bfe1c1f45b0acca4a2b4f84d345ce: resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/ae570fec082bfe1c1f45b0acca4a2b4f84d345ce} version: 1.7.6 + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b} + version: 1.9.2 + form-data-encoder@2.1.4: resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} engines: {node: '>= 14.17'} @@ -1393,8 +1400,8 @@ packages: match-all@1.2.6: resolution: {integrity: sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ==} - mcl-wasm@1.5.0: - resolution: {integrity: sha512-+Bnefweg0PWhQ//pVAawNkZAC+TH/mMZVsxmEyHvw8Ujhwu3cxUe9WITFK74dfgPRB09Zkmf6aUFXnW23OnVUw==} + mcl-wasm@1.6.0: + resolution: {integrity: sha512-mMNYpBpXgruXOgoZ4ukOldzafgEd3blvXTvVd4A50NSxjVoIG10bCTQR7hY7a2jgABim640sXD0e7qsvihKgXg==} engines: {node: '>=14.17'} md5.js@1.3.5: @@ -2380,6 +2387,11 @@ snapshots: dependencies: ethers: 5.7.2 + '@matterlabs/zksync-contracts@0.6.1(@openzeppelin/contracts-upgradeable@5.0.1(@openzeppelin/contracts@5.0.2))(@openzeppelin/contracts@5.0.2)': + dependencies: + '@openzeppelin/contracts': 5.0.2 + '@openzeppelin/contracts-upgradeable': 5.0.1(@openzeppelin/contracts@5.0.2) + '@metamask/eth-sig-util@4.0.1': dependencies: ethereumjs-abi: 0.6.8 @@ -2533,7 +2545,7 @@ snapshots: '@rhinestone/checknsignatures@https://codeload.github.com/rhinestonewtf/checknsignatures/tar.gz/7ff44ef46da1266374e6a98e6cf69d727d7c357d': dependencies: - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b solady: https://codeload.github.com/vectorized/solady/tar.gz/4f50982008973b1431768a75fb88ac8eca21b9f6 '@rhinestone/erc4337-validation@0.0.1-alpha.2(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4))(typescript@5.5.4)': @@ -2542,7 +2554,7 @@ snapshots: account-abstraction: accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) account-abstraction-v0.6: accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/7174d6d845618dbd11cee68eefa715f5263690b6(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b prettier: 2.8.8 solady: https://codeload.github.com/vectorized/solady/tar.gz/4f50982008973b1431768a75fb88ac8eca21b9f6 solhint: 4.5.4(typescript@5.5.4) @@ -2563,7 +2575,7 @@ snapshots: account-abstraction: accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) account-abstraction-v0.6: accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/7174d6d845618dbd11cee68eefa715f5263690b6(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b prettier: 2.8.8 solady: https://codeload.github.com/vectorized/solady/tar.gz/4f50982008973b1431768a75fb88ac8eca21b9f6 transitivePeerDependencies: @@ -2580,7 +2592,7 @@ snapshots: dependencies: '@ERC4337/account-abstraction': accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) erc7579: erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/b3f8bcb2df3aae3217213ffa8b7a87c1eb42ec56(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b transitivePeerDependencies: - bufferutil - encoding @@ -2606,7 +2618,7 @@ snapshots: ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 erc7579: erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/b3f8bcb2df3aae3217213ffa8b7a87c1eb42ec56(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) excessively-safe-call: '@nomad-xyz/excessively-safe-call@https://codeload.github.com/nomad-xyz/ExcessivelySafeCall/tar.gz/81cd99ce3e69117d665d7601c330ea03b97acce0' - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b solady: https://codeload.github.com/vectorized/solady/tar.gz/4f50982008973b1431768a75fb88ac8eca21b9f6 solarray: https://codeload.github.com/sablier-labs/solarray/tar.gz/6bf10cb34cdace52a3ba5fe437e78cc82df92684 transitivePeerDependencies: @@ -2637,7 +2649,7 @@ snapshots: '@safe-global/safe-contracts': 1.4.1(ethers@5.7.2) ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 erc7579: erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/b3f8bcb2df3aae3217213ffa8b7a87c1eb42ec56(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b solady: https://codeload.github.com/vectorized/solady/tar.gz/4f50982008973b1431768a75fb88ac8eca21b9f6 solarray: https://codeload.github.com/sablier-labs/solarray/tar.gz/6bf10cb34cdace52a3ba5fe437e78cc82df92684 transitivePeerDependencies: @@ -2653,7 +2665,7 @@ snapshots: '@rhinestone/sentinellist@https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/67e42f0eb3cf355ddba5a017892f9cc28d924875': dependencies: - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b '@safe-global/safe-contracts@1.4.1(ethers@5.7.2)': dependencies: @@ -2743,7 +2755,7 @@ snapshots: '@thehubbleproject/bls@0.5.1': dependencies: ethers: 5.7.2 - mcl-wasm: 1.5.0 + mcl-wasm: 1.6.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -2828,7 +2840,18 @@ snapshots: '@openzeppelin/contracts': 5.0.2 dotenv: 16.4.5 - '@zk-email/ether-email-auth@https://codeload.github.com/zkemail/ether-email-auth/tar.gz/3fb09045688c9b5d291efb03bf1e785ec424aeff': {} + '@zk-email/contracts@6.1.5': + dependencies: + '@openzeppelin/contracts': 5.0.2 + dotenv: 16.4.5 + + '@zk-email/ether-email-auth-contracts@0.0.1-preview': + dependencies: + '@matterlabs/zksync-contracts': 0.6.1(@openzeppelin/contracts-upgradeable@5.0.1(@openzeppelin/contracts@5.0.2))(@openzeppelin/contracts@5.0.2) + '@openzeppelin/contracts': 5.0.2 + '@openzeppelin/contracts-upgradeable': 5.0.1(@openzeppelin/contracts@5.0.2) + '@zk-email/contracts': 6.1.5 + solady: 0.0.123 abbrev@1.0.9: {} @@ -3314,7 +3337,7 @@ snapshots: '@rhinestone/sentinellist': https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/67e42f0eb3cf355ddba5a017892f9cc28d924875 account-abstraction: accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/6f02f5a28a20e804d0410b4b5b570dd4b076dcf9(ethers@5.7.2)(hardhat@2.22.8(typescript@5.5.4))(lodash@4.17.21)(typechain@5.2.0(typescript@5.5.4)) ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b solady: https://codeload.github.com/vectorized/solady/tar.gz/4f50982008973b1431768a75fb88ac8eca21b9f6 transitivePeerDependencies: - bufferutil @@ -3530,10 +3553,10 @@ snapshots: optionalDependencies: debug: 4.3.7(supports-color@8.1.1) - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c: {} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/ae570fec082bfe1c1f45b0acca4a2b4f84d345ce: {} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/e04104ab93e771441eab03fb76eda1402cb5927b: {} + form-data-encoder@2.1.4: {} form-data@4.0.0: @@ -3975,7 +3998,7 @@ snapshots: match-all@1.2.6: {} - mcl-wasm@1.5.0: + mcl-wasm@1.6.0: dependencies: '@types/node': 20.16.5 diff --git a/remappings.txt b/remappings.txt index 3baedc9e..f9a9a207 100644 --- a/remappings.txt +++ b/remappings.txt @@ -18,7 +18,7 @@ solady/=node_modules/solady/src/ solarray/=node_modules/solarray/src/ @prb/math/=node_modules/@prb/math/src/ -ether-email-auth/=node_modules/@zk-email/ether-email-auth/ +ether-email-auth/=node_modules/@zk-email/ether-email-auth-contracts/ @zk-email/contracts/=node_modules/@zk-email/contracts/ solidity-stringutils/=node_modules/solidity-stringutils/ @matterlabs/zksync-contracts/l2/contracts/=src/libraries/ diff --git a/script/Deploy7579TestAccount.s.sol b/script/Deploy7579TestAccount.s.sol index 957e0952..b8bb49de 100644 --- a/script/Deploy7579TestAccount.s.sol +++ b/script/Deploy7579TestAccount.s.sol @@ -3,8 +3,7 @@ pragma solidity ^0.8.25; import { Script } from "forge-std/Script.sol"; import { console } from "forge-std/console.sol"; -import { EmailAccountRecovery } from - "ether-email-auth/packages/contracts/src/EmailAccountRecovery.sol"; +import { EmailAccountRecovery } from "ether-email-auth/src/EmailAccountRecovery.sol"; import { IGuardianManager } from "src/interfaces/IGuardianManager.sol"; import { RhinestoneModuleKit } from "modulekit/ModuleKit.sol"; import { OwnableValidator } from "src/test/OwnableValidator.sol"; diff --git a/script/DeployEmailRecoveryModule.s.sol b/script/DeployEmailRecoveryModule.s.sol index 92739441..70401918 100644 --- a/script/DeployEmailRecoveryModule.s.sol +++ b/script/DeployEmailRecoveryModule.s.sol @@ -4,11 +4,10 @@ pragma solidity ^0.8.25; import { Script } from "forge-std/Script.sol"; import { console } from "forge-std/console.sol"; import { EmailRecoveryCommandHandler } from "src/handlers/EmailRecoveryCommandHandler.sol"; -import { Verifier } from "ether-email-auth/packages/contracts/src/utils/Verifier.sol"; -import { Groth16Verifier } from "ether-email-auth/packages/contracts/src/utils/Groth16Verifier.sol"; -import { ECDSAOwnedDKIMRegistry } from - "ether-email-auth/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol"; -import { EmailAuth } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { Verifier } from "ether-email-auth/src/utils/Verifier.sol"; +import { Groth16Verifier } from "ether-email-auth/src/utils/Groth16Verifier.sol"; +import { ECDSAOwnedDKIMRegistry } from "ether-email-auth/src/utils/ECDSAOwnedDKIMRegistry.sol"; +import { EmailAuth } from "ether-email-auth/src/EmailAuth.sol"; import { EmailRecoveryFactory } from "src/factories/EmailRecoveryFactory.sol"; import { OwnableValidator } from "src/test/OwnableValidator.sol"; import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; diff --git a/script/DeploySafeNativeRecovery.s.sol b/script/DeploySafeNativeRecovery.s.sol index e92727a8..911afcb2 100644 --- a/script/DeploySafeNativeRecovery.s.sol +++ b/script/DeploySafeNativeRecovery.s.sol @@ -3,11 +3,10 @@ pragma solidity ^0.8.25; import { Script } from "forge-std/Script.sol"; import { console } from "forge-std/console.sol"; -import { Verifier } from "ether-email-auth/packages/contracts/src/utils/Verifier.sol"; -import { Groth16Verifier } from "ether-email-auth/packages/contracts/src/utils/Groth16Verifier.sol"; -import { ECDSAOwnedDKIMRegistry } from - "ether-email-auth/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol"; -import { EmailAuth } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { Verifier } from "ether-email-auth/src/utils/Verifier.sol"; +import { Groth16Verifier } from "ether-email-auth/src/utils/Groth16Verifier.sol"; +import { ECDSAOwnedDKIMRegistry } from "ether-email-auth/src/utils/ECDSAOwnedDKIMRegistry.sol"; +import { EmailAuth } from "ether-email-auth/src/EmailAuth.sol"; import { SafeRecoveryCommandHandler } from "src/handlers/SafeRecoveryCommandHandler.sol"; import { SafeEmailRecoveryModule } from "src/modules/SafeEmailRecoveryModule.sol"; import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; diff --git a/script/DeploySafeRecovery.s.sol b/script/DeploySafeRecovery.s.sol index 056c3682..f8ef6df4 100644 --- a/script/DeploySafeRecovery.s.sol +++ b/script/DeploySafeRecovery.s.sol @@ -6,11 +6,10 @@ import { console } from "forge-std/console.sol"; import { SafeRecoveryCommandHandler } from "src/handlers/SafeRecoveryCommandHandler.sol"; import { EmailRecoveryFactory } from "src/factories/EmailRecoveryFactory.sol"; import { EmailRecoveryUniversalFactory } from "src/factories/EmailRecoveryUniversalFactory.sol"; -import { Verifier } from "ether-email-auth/packages/contracts/src/utils/Verifier.sol"; -import { Groth16Verifier } from "ether-email-auth/packages/contracts/src/utils/Groth16Verifier.sol"; -import { ECDSAOwnedDKIMRegistry } from - "ether-email-auth/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol"; -import { EmailAuth } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { Verifier } from "ether-email-auth/src/utils/Verifier.sol"; +import { Groth16Verifier } from "ether-email-auth/src/utils/Groth16Verifier.sol"; +import { ECDSAOwnedDKIMRegistry } from "ether-email-auth/src/utils/ECDSAOwnedDKIMRegistry.sol"; +import { EmailAuth } from "ether-email-auth/src/EmailAuth.sol"; import { Safe7579 } from "safe7579/Safe7579.sol"; import { Safe7579Launchpad } from "safe7579/Safe7579Launchpad.sol"; diff --git a/script/DeployUniversalEmailRecoveryModule.s.sol b/script/DeployUniversalEmailRecoveryModule.s.sol index 797aa68a..cf6c01da 100644 --- a/script/DeployUniversalEmailRecoveryModule.s.sol +++ b/script/DeployUniversalEmailRecoveryModule.s.sol @@ -4,11 +4,10 @@ pragma solidity ^0.8.25; import { Script } from "forge-std/Script.sol"; import { console } from "forge-std/console.sol"; import { EmailRecoveryCommandHandler } from "src/handlers/EmailRecoveryCommandHandler.sol"; -import { Verifier } from "ether-email-auth/packages/contracts/src/utils/Verifier.sol"; -import { Groth16Verifier } from "ether-email-auth/packages/contracts/src/utils/Groth16Verifier.sol"; -import { ECDSAOwnedDKIMRegistry } from - "ether-email-auth/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol"; -import { EmailAuth } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { Verifier } from "ether-email-auth/src/utils/Verifier.sol"; +import { Groth16Verifier } from "ether-email-auth/src/utils/Groth16Verifier.sol"; +import { ECDSAOwnedDKIMRegistry } from "ether-email-auth/src/utils/ECDSAOwnedDKIMRegistry.sol"; +import { EmailAuth } from "ether-email-auth/src/EmailAuth.sol"; import { EmailRecoveryUniversalFactory } from "src/factories/EmailRecoveryUniversalFactory.sol"; import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; diff --git a/src/EmailRecoveryManager.sol b/src/EmailRecoveryManager.sol index 9ee7c241..968873f0 100644 --- a/src/EmailRecoveryManager.sol +++ b/src/EmailRecoveryManager.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.25; -import { EmailAccountRecovery } from - "ether-email-auth/packages/contracts/src/EmailAccountRecovery.sol"; +import { EmailAccountRecovery } from "ether-email-auth/src/EmailAccountRecovery.sol"; import { IEmailRecoveryManager } from "./interfaces/IEmailRecoveryManager.sol"; import { IEmailRecoveryCommandHandler } from "./interfaces/IEmailRecoveryCommandHandler.sol"; import { GuardianManager } from "./GuardianManager.sol"; @@ -226,9 +225,7 @@ abstract contract EmailRecoveryManager is * that no recovery is in process. * @param recoveryConfig The new recovery configuration to be set for the caller's account */ - function updateRecoveryConfig( - RecoveryConfig memory recoveryConfig - ) + function updateRecoveryConfig(RecoveryConfig memory recoveryConfig) public onlyWhenNotRecovering { diff --git a/test/integration/EmailRecoveryManager/EmailRecoveryManager.integration.t.sol b/test/integration/EmailRecoveryManager/EmailRecoveryManager.integration.t.sol index 31d02d3c..95638ec6 100644 --- a/test/integration/EmailRecoveryManager/EmailRecoveryManager.integration.t.sol +++ b/test/integration/EmailRecoveryManager/EmailRecoveryManager.integration.t.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.25; import { console2 } from "forge-std/console2.sol"; import { ModuleKitHelpers, ModuleKitUserOp } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR, MODULE_TYPE_VALIDATOR } from "modulekit/external/ERC7579.sol"; -import { EmailAuthMsg } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { EmailAuthMsg } from "ether-email-auth/src/EmailAuth.sol"; import { IEmailRecoveryManager } from "src/interfaces/IEmailRecoveryManager.sol"; import { IGuardianManager } from "src/interfaces/IGuardianManager.sol"; diff --git a/test/integration/IntegrationBase.t.sol b/test/integration/IntegrationBase.t.sol index 9858c9d7..350d44b9 100644 --- a/test/integration/IntegrationBase.t.sol +++ b/test/integration/IntegrationBase.t.sol @@ -5,9 +5,8 @@ import { Test } from "forge-std/Test.sol"; import { console2 } from "forge-std/console2.sol"; import { RhinestoneModuleKit, AccountInstance } from "modulekit/ModuleKit.sol"; -import { ECDSAOwnedDKIMRegistry } from - "ether-email-auth/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol"; -import { EmailAuth } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { ECDSAOwnedDKIMRegistry } from "ether-email-auth/src/utils/ECDSAOwnedDKIMRegistry.sol"; +import { EmailAuth } from "ether-email-auth/src/EmailAuth.sol"; import { ECDSA } from "solady/utils/ECDSA.sol"; import { MockGroth16Verifier } from "src/test/MockGroth16Verifier.sol"; diff --git a/test/integration/OwnableValidatorRecovery/EmailRecoveryModule/EmailRecoveryModule.t.sol b/test/integration/OwnableValidatorRecovery/EmailRecoveryModule/EmailRecoveryModule.t.sol index 14eedc25..21c11d24 100644 --- a/test/integration/OwnableValidatorRecovery/EmailRecoveryModule/EmailRecoveryModule.t.sol +++ b/test/integration/OwnableValidatorRecovery/EmailRecoveryModule/EmailRecoveryModule.t.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.25; import { console2 } from "forge-std/console2.sol"; import { ModuleKitHelpers, ModuleKitUserOp } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR, MODULE_TYPE_VALIDATOR } from "modulekit/external/ERC7579.sol"; -import { EmailAuthMsg } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; -import { CommandUtils } from "ether-email-auth/packages/contracts/src/libraries/CommandUtils.sol"; +import { EmailAuthMsg } from "ether-email-auth/src/EmailAuth.sol"; +import { CommandUtils } from "ether-email-auth/src/libraries/CommandUtils.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { IEmailRecoveryManager } from "src/interfaces/IEmailRecoveryManager.sol"; diff --git a/test/integration/OwnableValidatorRecovery/EmailRecoveryModule/EmailRecoveryModuleBase.t.sol b/test/integration/OwnableValidatorRecovery/EmailRecoveryModule/EmailRecoveryModuleBase.t.sol index 7fa0cfdb..d02331b9 100644 --- a/test/integration/OwnableValidatorRecovery/EmailRecoveryModule/EmailRecoveryModuleBase.t.sol +++ b/test/integration/OwnableValidatorRecovery/EmailRecoveryModule/EmailRecoveryModuleBase.t.sol @@ -5,12 +5,8 @@ import { console2 } from "forge-std/console2.sol"; import { ModuleKitHelpers, ModuleKitUserOp } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR, MODULE_TYPE_VALIDATOR } from "modulekit/external/ERC7579.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { - EmailAuth, - EmailAuthMsg, - EmailProof -} from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; -import { CommandUtils } from "ether-email-auth/packages/contracts/src/libraries/CommandUtils.sol"; +import { EmailAuth, EmailAuthMsg, EmailProof } from "ether-email-auth/src/EmailAuth.sol"; +import { CommandUtils } from "ether-email-auth/src/libraries/CommandUtils.sol"; import { EmailRecoveryCommandHandler } from "src/handlers/EmailRecoveryCommandHandler.sol"; import { EmailRecoveryFactory } from "src/factories/EmailRecoveryFactory.sol"; import { EmailRecoveryManager } from "src/EmailRecoveryManager.sol"; diff --git a/test/integration/OwnableValidatorRecovery/UniversalEmailRecoveryModule/UniversalEmailRecoveryModule.t.sol b/test/integration/OwnableValidatorRecovery/UniversalEmailRecoveryModule/UniversalEmailRecoveryModule.t.sol index 5b620d65..909e6bc3 100644 --- a/test/integration/OwnableValidatorRecovery/UniversalEmailRecoveryModule/UniversalEmailRecoveryModule.t.sol +++ b/test/integration/OwnableValidatorRecovery/UniversalEmailRecoveryModule/UniversalEmailRecoveryModule.t.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.25; import { console2 } from "forge-std/console2.sol"; import { ModuleKitHelpers, ModuleKitUserOp } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR, MODULE_TYPE_VALIDATOR } from "modulekit/external/ERC7579.sol"; -import { EmailAuthMsg } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { EmailAuthMsg } from "ether-email-auth/src/EmailAuth.sol"; import { IEmailRecoveryManager } from "src/interfaces/IEmailRecoveryManager.sol"; import { IGuardianManager } from "src/interfaces/IGuardianManager.sol"; diff --git a/test/integration/OwnableValidatorRecovery/UniversalEmailRecoveryModule/UniversalEmailRecoveryModuleBase.t.sol b/test/integration/OwnableValidatorRecovery/UniversalEmailRecoveryModule/UniversalEmailRecoveryModuleBase.t.sol index 1cbc636d..bedf9f03 100644 --- a/test/integration/OwnableValidatorRecovery/UniversalEmailRecoveryModule/UniversalEmailRecoveryModuleBase.t.sol +++ b/test/integration/OwnableValidatorRecovery/UniversalEmailRecoveryModule/UniversalEmailRecoveryModuleBase.t.sol @@ -5,12 +5,8 @@ import { console2 } from "forge-std/console2.sol"; import { ModuleKitHelpers, ModuleKitUserOp } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR, MODULE_TYPE_VALIDATOR } from "modulekit/external/ERC7579.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { - EmailAuth, - EmailAuthMsg, - EmailProof -} from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; -import { CommandUtils } from "ether-email-auth/packages/contracts/src/libraries/CommandUtils.sol"; +import { EmailAuth, EmailAuthMsg, EmailProof } from "ether-email-auth/src/EmailAuth.sol"; +import { CommandUtils } from "ether-email-auth/src/libraries/CommandUtils.sol"; import { EmailRecoveryCommandHandler } from "src/handlers/EmailRecoveryCommandHandler.sol"; import { EmailRecoveryFactory } from "src/factories/EmailRecoveryFactory.sol"; import { EmailRecoveryUniversalFactory } from "src/factories/EmailRecoveryUniversalFactory.sol"; diff --git a/test/integration/SafeRecovery/SafeIntegrationBase.t.sol b/test/integration/SafeRecovery/SafeIntegrationBase.t.sol index 5613aeaa..bf19f940 100644 --- a/test/integration/SafeRecovery/SafeIntegrationBase.t.sol +++ b/test/integration/SafeRecovery/SafeIntegrationBase.t.sol @@ -5,8 +5,8 @@ import { console2 } from "forge-std/console2.sol"; import { ModuleKitHelpers } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR } from "modulekit/external/ERC7579.sol"; -import { EmailAuthMsg, EmailProof } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; -import { CommandUtils } from "ether-email-auth/packages/contracts/src/libraries/CommandUtils.sol"; +import { EmailAuthMsg, EmailProof } from "ether-email-auth/src/EmailAuth.sol"; +import { CommandUtils } from "ether-email-auth/src/libraries/CommandUtils.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { EmailRecoveryManager } from "src/EmailRecoveryManager.sol"; diff --git a/test/integration/SafeRecovery/SafeNativeIntegrationBase.t.sol b/test/integration/SafeRecovery/SafeNativeIntegrationBase.t.sol index a62dff45..83030cf1 100644 --- a/test/integration/SafeRecovery/SafeNativeIntegrationBase.t.sol +++ b/test/integration/SafeRecovery/SafeNativeIntegrationBase.t.sol @@ -5,8 +5,8 @@ import { console2 } from "forge-std/console2.sol"; import { ModuleKitHelpers } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR } from "modulekit/external/ERC7579.sol"; -import { EmailAuthMsg, EmailProof } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; -import { CommandUtils } from "ether-email-auth/packages/contracts/src/libraries/CommandUtils.sol"; +import { EmailAuthMsg, EmailProof } from "ether-email-auth/src/EmailAuth.sol"; +import { CommandUtils } from "ether-email-auth/src/libraries/CommandUtils.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { Safe } from "@safe-global/safe-contracts/contracts/Safe.sol"; diff --git a/test/integration/SafeRecovery/SafeRecoveryNativeModule.t.sol b/test/integration/SafeRecovery/SafeRecoveryNativeModule.t.sol index b9ee92a5..977e8f20 100644 --- a/test/integration/SafeRecovery/SafeRecoveryNativeModule.t.sol +++ b/test/integration/SafeRecovery/SafeRecoveryNativeModule.t.sol @@ -8,7 +8,7 @@ import { IERC7579Account } from "erc7579/interfaces/IERC7579Account.sol"; import { Safe } from "@safe-global/safe-contracts/contracts/Safe.sol"; import { SafeProxy } from "@safe-global/safe-contracts/contracts/proxies/SafeProxy.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { EmailAuthMsg } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { EmailAuthMsg } from "ether-email-auth/src/EmailAuth.sol"; import { SafeEmailRecoveryModule } from "src/modules/SafeEmailRecoveryModule.sol"; import { IEmailRecoveryManager } from "src/interfaces/IEmailRecoveryManager.sol"; import { AccountHidingRecoveryCommandHandler } from diff --git a/test/unit/SafeUnitBase.t.sol b/test/unit/SafeUnitBase.t.sol index 4ddfb8de..4ce84cd3 100644 --- a/test/unit/SafeUnitBase.t.sol +++ b/test/unit/SafeUnitBase.t.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.25; import { console2 } from "forge-std/console2.sol"; import { ModuleKitHelpers } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR } from "modulekit/external/ERC7579.sol"; -import { EmailAuthMsg, EmailProof } from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; -import { CommandUtils } from "ether-email-auth/packages/contracts/src/libraries/CommandUtils.sol"; +import { EmailAuthMsg, EmailProof } from "ether-email-auth/src/EmailAuth.sol"; +import { CommandUtils } from "ether-email-auth/src/libraries/CommandUtils.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { EmailRecoveryManager } from "src/EmailRecoveryManager.sol"; diff --git a/test/unit/UnitBase.t.sol b/test/unit/UnitBase.t.sol index 01886d20..3cdd1888 100644 --- a/test/unit/UnitBase.t.sol +++ b/test/unit/UnitBase.t.sol @@ -10,14 +10,9 @@ import { ModuleKitUserOp } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR, MODULE_TYPE_VALIDATOR } from "modulekit/external/ERC7579.sol"; -import { ECDSAOwnedDKIMRegistry } from - "ether-email-auth/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol"; -import { CommandUtils } from "ether-email-auth/packages/contracts/src/libraries/CommandUtils.sol"; -import { - EmailAuth, - EmailAuthMsg, - EmailProof -} from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { ECDSAOwnedDKIMRegistry } from "ether-email-auth/src/utils/ECDSAOwnedDKIMRegistry.sol"; +import { CommandUtils } from "ether-email-auth/src/libraries/CommandUtils.sol"; +import { EmailAuth, EmailAuthMsg, EmailProof } from "ether-email-auth/src/EmailAuth.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { ECDSA } from "solady/utils/ECDSA.sol"; diff --git a/test/unit/modules/EmailRecoveryModule/EmailRecoveryModuleBase.t.sol b/test/unit/modules/EmailRecoveryModule/EmailRecoveryModuleBase.t.sol index 40bb08a5..31233ee2 100644 --- a/test/unit/modules/EmailRecoveryModule/EmailRecoveryModuleBase.t.sol +++ b/test/unit/modules/EmailRecoveryModule/EmailRecoveryModuleBase.t.sol @@ -10,14 +10,9 @@ import { ModuleKitUserOp } from "modulekit/ModuleKit.sol"; import { MODULE_TYPE_EXECUTOR, MODULE_TYPE_VALIDATOR } from "modulekit/external/ERC7579.sol"; -import { ECDSAOwnedDKIMRegistry } from - "ether-email-auth/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol"; -import { CommandUtils } from "ether-email-auth/packages/contracts/src/libraries/CommandUtils.sol"; -import { - EmailAuth, - EmailAuthMsg, - EmailProof -} from "ether-email-auth/packages/contracts/src/EmailAuth.sol"; +import { ECDSAOwnedDKIMRegistry } from "ether-email-auth/src/utils/ECDSAOwnedDKIMRegistry.sol"; +import { CommandUtils } from "ether-email-auth/src/libraries/CommandUtils.sol"; +import { EmailAuth, EmailAuthMsg, EmailProof } from "ether-email-auth/src/EmailAuth.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { ECDSA } from "solady/utils/ECDSA.sol";