From a7019837ed93998c3b1b947bae051bce55040a37 Mon Sep 17 00:00:00 2001 From: John Guilding Date: Mon, 11 Nov 2024 00:16:18 +0700 Subject: [PATCH] Downgrade modulekit --- package.json | 3 +- pnpm-lock.yaml | 121 +++------ remappings.txt | 1 - script/Deploy7579TestAccount.s.sol | 240 ------------------ ...ySafeNativeRecoveryWithAccountHiding.s.sol | 5 +- 5 files changed, 40 insertions(+), 330 deletions(-) delete mode 100644 script/Deploy7579TestAccount.s.sol diff --git a/package.json b/package.json index a6d0c8f8..e1819d2d 100644 --- a/package.json +++ b/package.json @@ -33,10 +33,9 @@ "dependencies": { "@matterlabs/era-contracts": "github:matter-labs/era-contracts", "@openzeppelin/contracts-upgradeable": "5.0.1", - "@rhinestone/modulekit": "0.4.16", + "@rhinestone/modulekit": "0.4.13", "@zk-email/contracts": "6.3.2", "@zk-email/ether-email-auth-contracts": "1.0.2", - "erc7579-implementation": "github:erc7579/erc7579-implementation", "solidity-stringutils": "github:LayerZero-Labs/solidity-stringutils" }, "files": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 89920291..f3dc9169 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,17 +15,14 @@ importers: specifier: 5.0.1 version: 5.0.1(@openzeppelin/contracts@5.1.0) '@rhinestone/modulekit': - specifier: 0.4.16 - version: 0.4.16(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5) + specifier: 0.4.13 + version: 0.4.13(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5) '@zk-email/contracts': specifier: 6.3.2 version: 6.3.2 '@zk-email/ether-email-auth-contracts': specifier: 1.0.2 version: 1.0.2 - erc7579-implementation: - specifier: github:erc7579/erc7579-implementation - version: https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/b3f8bcb2df3aae3217213ffa8b7a87c1eb42ec56(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) solidity-stringutils: specifier: github:LayerZero-Labs/solidity-stringutils version: https://codeload.github.com/LayerZero-Labs/solidity-stringutils/tar.gz/eb21d6b502c2741145ab2a90f5f5b4fda9dfb218 @@ -327,19 +324,15 @@ packages: '@rhinestone/erc4337-validation@0.0.1-alpha.2': resolution: {integrity: sha512-sxBSHoR0hV0rN2bv5HfINHR3RyBChfd0OWH0TP8nlA9FolJ1EezLByxcyrvAgi2QLQ2Zf2zVcNky1qYdfF4NjQ==} - '@rhinestone/erc4337-validation@0.0.4': - resolution: {integrity: sha512-9GPvOvmM9j5ZZRCFeujPacUyByRnrGL22/5177hRzXh5mLq/A22EyvVIVNcsWMvNiLcHAV4dkkKpXaljxNOT9A==} + '@rhinestone/erc4337-validation@0.0.1-alpha.5': + resolution: {integrity: sha512-yOrYyQBrT0JfHb+rjvx4pqk8uItKxEtn7n8z3k0qbZTzkXaNS9pCUBsTxy0kp6T2SNUrbQ8I4DMSiyGqjdh2ng==} - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/92fe10438701c35af92cda56deda1fbccde1c67d': - resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/92fe10438701c35af92cda56deda1fbccde1c67d} + '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/ed01be1780af30dee8a0877b8f2d494842290fb2': + resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/ed01be1780af30dee8a0877b8f2d494842290fb2} version: 0.0.1 - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7': - resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7} - version: 0.0.1 - - '@rhinestone/modulekit@0.4.16': - resolution: {integrity: sha512-3yDsgiwg+fft5YMNE/ZWe/ftfqdDnmEQ0F92ynTKx0B0+ikwBDBsj0BwrBADZeh92xKbiEcVEhTooaeteF3X0A==} + '@rhinestone/modulekit@0.4.13': + resolution: {integrity: sha512-kuzU298oPIt4rLXPRgxVW9gHIj7x+iAjOX+eC3iNs8zt1KxatmWv+pDI+mze9vjgsp9u4j6j6h+MYmaloSLCEQ==} '@rhinestone/registry@https://codeload.github.com/rhinestonewtf/registry/tar.gz/1371979a97293e0c6188afcd923784f6a718ae7d': resolution: {tarball: https://codeload.github.com/rhinestonewtf/registry/tar.gz/1371979a97293e0c6188afcd923784f6a718ae7d} @@ -856,10 +849,6 @@ packages: resolution: {tarball: https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/2081c0f9dc31b2e054a91956968180ea3fccf307} version: 0.3.1 - erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/b3f8bcb2df3aae3217213ffa8b7a87c1eb42ec56: - resolution: {tarball: https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/b3f8bcb2df3aae3217213ffa8b7a87c1eb42ec56} - version: 0.3.1 - error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -1001,18 +990,14 @@ packages: debug: optional: true - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/8a225d81aa8e2e013580564588c79abb65eacc9e: - resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/8a225d81aa8e2e013580564588c79abb65eacc9e} - version: 1.9.3 + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70} + version: 1.9.4 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/da591f56d8884c5824c0c1b3103fbcfd81123c4c: - resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c} - version: 1.9.4 - form-data-encoder@2.1.4: resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} engines: {node: '>= 14.17'} @@ -1767,9 +1752,9 @@ packages: solady@0.0.123: resolution: {integrity: sha512-F/B8OMCplGsS4FrdPrnEG0xdg8HKede5PwC+Rum8soj/LWxfKckA0p+Uwnlbgey2iI82IHvmSOCNhsdbA+lUrw==} - solady@https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed: - resolution: {tarball: https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed} - version: 0.0.265 + solady@https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1: + resolution: {tarball: https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1} + version: 0.0.267 solady@https://codeload.github.com/vectorized/solady/tar.gz/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e: resolution: {tarball: https://codeload.github.com/vectorized/solady/tar.gz/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e} @@ -2497,8 +2482,8 @@ snapshots: '@rhinestone/checknsignatures@https://codeload.github.com/rhinestonewtf/checknsignatures/tar.gz/ef8e54b1df861681059b60be32ef9576030ea984': dependencies: - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c - solady: https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70 + solady: https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1 '@rhinestone/erc4337-validation@0.0.1-alpha.2(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5)': dependencies: @@ -2506,9 +2491,9 @@ snapshots: account-abstraction: accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) account-abstraction-v0.6: accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/7174d6d845618dbd11cee68eefa715f5263690b6(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70 prettier: 2.8.8 - solady: https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed + solady: https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1 solhint: 4.5.4(typescript@4.9.5) transitivePeerDependencies: - bufferutil @@ -2521,15 +2506,15 @@ snapshots: - typescript - utf-8-validate - '@rhinestone/erc4337-validation@0.0.4(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))': + '@rhinestone/erc4337-validation@0.0.1-alpha.5(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))': dependencies: '@openzeppelin/contracts': 5.0.1 account-abstraction: accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) account-abstraction-v0.6: accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/7174d6d845618dbd11cee68eefa715f5263690b6(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/8a225d81aa8e2e013580564588c79abb65eacc9e + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70 prettier: 2.8.8 - solady: https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed + solady: https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1 transitivePeerDependencies: - bufferutil - encoding @@ -2540,11 +2525,11 @@ snapshots: - typechain - utf-8-validate - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/92fe10438701c35af92cda56deda1fbccde1c67d(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))': + '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/ed01be1780af30dee8a0877b8f2d494842290fb2(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))': dependencies: '@ERC4337/account-abstraction': accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) erc7579: erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/2081c0f9dc31b2e054a91956968180ea3fccf307(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70 transitivePeerDependencies: - bufferutil - encoding @@ -2555,28 +2540,13 @@ snapshots: - typechain - utf-8-validate - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))': - dependencies: - '@ERC4337/account-abstraction': accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) - erc7579: erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/2081c0f9dc31b2e054a91956968180ea3fccf307(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c - transitivePeerDependencies: - - bufferutil - - encoding - - ethers - - hardhat - - lodash - - supports-color - - typechain - - utf-8-validate - - '@rhinestone/modulekit@0.4.16(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5)': + '@rhinestone/modulekit@0.4.13(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5)': dependencies: '@ERC4337/account-abstraction': accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@ERC4337/account-abstraction-v0.6': accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/7174d6d845618dbd11cee68eefa715f5263690b6(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@prb/math': 4.1.0 - '@rhinestone/erc4337-validation': 0.0.4(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) - '@rhinestone/module-bases': https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) + '@rhinestone/erc4337-validation': 0.0.1-alpha.5(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) + '@rhinestone/module-bases': https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/ed01be1780af30dee8a0877b8f2d494842290fb2(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@rhinestone/registry': https://codeload.github.com/rhinestonewtf/registry/tar.gz/1371979a97293e0c6188afcd923784f6a718ae7d '@rhinestone/safe7579': https://codeload.github.com/rhinestonewtf/safe7579/tar.gz/33f110f08ed5fcab75c29d7cfb93f7f3e4da76a7(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5) '@rhinestone/sentinellist': https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/e722c5cc68c570d535bc3c9f85b3ce90cdc38807 @@ -2585,8 +2555,8 @@ 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/2081c0f9dc31b2e054a91956968180ea3fccf307(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) 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/da591f56d8884c5824c0c1b3103fbcfd81123c4c - solady: https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70 + solady: https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1 solarray: https://codeload.github.com/sablier-labs/solarray/tar.gz/6bf10cb34cdace52a3ba5fe437e78cc82df92684 transitivePeerDependencies: - bufferutil @@ -2611,13 +2581,13 @@ snapshots: '@ERC4337/account-abstraction-v0.6': accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/7174d6d845618dbd11cee68eefa715f5263690b6(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@rhinestone/checknsignatures': https://codeload.github.com/rhinestonewtf/checknsignatures/tar.gz/ef8e54b1df861681059b60be32ef9576030ea984 '@rhinestone/erc4337-validation': 0.0.1-alpha.2(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5) - '@rhinestone/module-bases': https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/92fe10438701c35af92cda56deda1fbccde1c67d(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) + '@rhinestone/module-bases': https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/ed01be1780af30dee8a0877b8f2d494842290fb2(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@rhinestone/sentinellist': https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/e722c5cc68c570d535bc3c9f85b3ce90cdc38807 '@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/2081c0f9dc31b2e054a91956968180ea3fccf307(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c - solady: https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70 + solady: https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1 solarray: https://codeload.github.com/sablier-labs/solarray/tar.gz/6bf10cb34cdace52a3ba5fe437e78cc82df92684 transitivePeerDependencies: - bufferutil @@ -2632,7 +2602,7 @@ snapshots: '@rhinestone/sentinellist@https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/e722c5cc68c570d535bc3c9f85b3ce90cdc38807': dependencies: - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70 '@safe-global/safe-contracts@1.4.1(ethers@5.7.2)': dependencies: @@ -3262,25 +3232,8 @@ snapshots: '@rhinestone/sentinellist': https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/e722c5cc68c570d535bc3c9f85b3ce90cdc38807 account-abstraction: accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/6f02f5a28a20e804d0410b4b5b570dd4b076dcf9(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c - solady: https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed - transitivePeerDependencies: - - bufferutil - - encoding - - ethers - - hardhat - - lodash - - supports-color - - typechain - - utf-8-validate - - erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/b3f8bcb2df3aae3217213ffa8b7a87c1eb42ec56(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)): - dependencies: - '@rhinestone/sentinellist': https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/e722c5cc68c570d535bc3c9f85b3ce90cdc38807 - account-abstraction: accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/6f02f5a28a20e804d0410b4b5b570dd4b076dcf9(ethers@5.7.2)(hardhat@2.22.14(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) - ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 - forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c - solady: https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70 + solady: https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1 transitivePeerDependencies: - bufferutil - encoding @@ -3495,12 +3448,10 @@ snapshots: optionalDependencies: debug: 4.3.7(supports-color@8.1.1) - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/8a225d81aa8e2e013580564588c79abb65eacc9e: {} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/0e7097750918380d84dd3cfdef595bee74dabb70: {} 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/da591f56d8884c5824c0c1b3103fbcfd81123c4c: {} - form-data-encoder@2.1.4: {} form-data@4.0.1: @@ -4330,7 +4281,7 @@ snapshots: solady@0.0.123: {} - solady@https://codeload.github.com/vectorized/solady/tar.gz/1c9927e9eb0c280c44c81c943976fe8995b382ed: {} + solady@https://codeload.github.com/vectorized/solady/tar.gz/4c8be46dbc8d2d319cc6acf058a6aa79c0b78eb1: {} solady@https://codeload.github.com/vectorized/solady/tar.gz/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e: {} diff --git a/remappings.txt b/remappings.txt index e1d30364..cf669fa8 100644 --- a/remappings.txt +++ b/remappings.txt @@ -22,6 +22,5 @@ solarray/=node_modules/solarray/src/ @zk-email/contracts/=node_modules/@zk-email/contracts/ solidity-stringutils/=node_modules/solidity-stringutils/ @matterlabs/zksync-contracts/l2/contracts/=src/libraries/ -erc7579-implementation/=node_modules/erc7579-implementation/ kernel/=node_modules/@zerodev/kernel/src/ ExcessivelySafeCall/=node_modules/excessively-safe-call/src/ diff --git a/script/Deploy7579TestAccount.s.sol b/script/Deploy7579TestAccount.s.sol deleted file mode 100644 index ab5816da..00000000 --- a/script/Deploy7579TestAccount.s.sol +++ /dev/null @@ -1,240 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.25; - -/* solhint-disable no-console, gas-custom-errors, max-states-count */ - -import { Script } from "forge-std/Script.sol"; -import { console } from "forge-std/console.sol"; -import { EmailAccountRecovery } from - "@zk-email/ether-email-auth-contracts/src/EmailAccountRecovery.sol"; -import { IGuardianManager } from "src/interfaces/IGuardianManager.sol"; -import { RhinestoneModuleKit } from "modulekit/ModuleKit.sol"; -import { OwnableValidator } from "src/test/OwnableValidator.sol"; -import { ModuleKitHelpers, ModuleKitUserOp } from "modulekit/ModuleKit.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { IERC7579Account } from "erc7579/interfaces/IERC7579Account.sol"; -import { IEntryPoint, ENTRYPOINT_ADDR } from "modulekit/test/predeploy/EntryPoint.sol"; -import { PackedUserOperation } from "erc7579-implementation/src/interfaces/IERC4337Account.sol"; -import { MSABasic } from "erc7579-implementation/src/MSABasic.sol"; -import { MSAFactory } from "erc7579-implementation/src/MSAFactory.sol"; -import { Bootstrap, BootstrapConfig } from "erc7579-implementation/src/utils/Bootstrap.sol"; -import { MockHook, MockTarget } from "modulekit/Mocks.sol"; -import { ModeLib } from "erc7579/lib/ModeLib.sol"; -import { ExecutionLib } from "erc7579-implementation/src/lib/ExecutionLib.sol"; -import { ECDSA } from "solady/utils/ECDSA.sol"; - -contract Deploy7579TestAccountScript is RhinestoneModuleKit, Script { - using ModuleKitHelpers for *; - using ModuleKitUserOp for *; - using Strings for uint256; - using Strings for address; - - uint256 public privKey; - address public deployer; - MSABasic public msaBasicImpl; - MSAFactory public msaFactory; - Bootstrap public bootstrap; - MockHook public hook; - MockTarget public mockTarget; - - bytes32 public accountSalt; - address public validatorAddr; - address public recoveryModuleAddr; - address[] public guardians = new address[](0); - uint256[] public guardianWeights = new uint256[](0); - - address public account; - bytes public initCode; - bytes public userOpCalldata; - PackedUserOperation public userOp; - bytes32 public userOpHash; - - bytes4 public functionSelector = bytes4(keccak256(bytes("changeOwner(address)"))); - - uint256 public salt = vm.envOr("CREATE2_SALT", uint256(0)); - - function run() public { - privKey = vm.envUint("PRIVATE_KEY"); - vm.startBroadcast(privKey); - deployer = vm.addr(privKey); - - accountSalt = vm.envBytes32("ACCOUNT_SALT"); - require(accountSalt != bytes32(0), "ACCOUNT_SALT is required"); - - address msaBasicImplAddr = vm.envOr("MSA_BASIC_IMPL", address(0)); - if (msaBasicImplAddr == address(0)) { - msaBasicImplAddr = address(new MSABasic{ salt: bytes32(salt) }()); - console.log("Deployed MSABasic at", msaBasicImplAddr); - } - msaBasicImpl = MSABasic(payable(msaBasicImplAddr)); - - address msaFactoryAddr = vm.envOr("MSA_FACTORY", address(0)); - if (msaFactoryAddr == address(0)) { - msaFactoryAddr = address(new MSAFactory{ salt: bytes32(salt) }(msaBasicImplAddr)); - console.log("Deployed MSAFactory at", msaFactoryAddr); - } - msaFactory = MSAFactory(msaFactoryAddr); - - address bootstrapAddr = vm.envOr("BOOTSTRAP", address(0)); - if (bootstrapAddr == address(0)) { - bootstrapAddr = address(new Bootstrap{ salt: bytes32(salt) }()); - console.log("Deployed Bootstrap at", bootstrapAddr); - } - bootstrap = Bootstrap(payable(bootstrapAddr)); - - address hookAddr = vm.envOr("HOOK", address(0)); - if (hookAddr == address(0)) { - hookAddr = address(new MockHook{ salt: bytes32(salt) }()); - console.log("Deployed MockHook at", hookAddr); - } - hook = MockHook(hookAddr); - - address mockTargetAddr = vm.envOr("MOCK_TARGET", address(0)); - if (mockTargetAddr == address(0)) { - mockTargetAddr = address(new MockTarget{ salt: bytes32(salt) }()); - console.log("Deployed MockTarget at", mockTargetAddr); - } - mockTarget = MockTarget(mockTargetAddr); - - validatorAddr = vm.envOr("VALIDATOR", address(0)); - if (validatorAddr == address(0)) { - validatorAddr = address(new OwnableValidator{ salt: bytes32(salt) }()); - console.log("Deployed Ownable Validator at", validatorAddr); - } - - // Create initcode to be sent to Factory - BootstrapConfig[] memory validators = new BootstrapConfig[](1); - address accountOwner = vm.envOr("OWNER", deployer); - recoveryModuleAddr = vm.envAddress("RECOVERY_MODULE"); - require(recoveryModuleAddr != address(0), "RECOVERY_MODULE is required"); - validators[0] = BootstrapConfig({ - module: validatorAddr, - data: abi.encode(accountOwner, recoveryModuleAddr) - }); - - BootstrapConfig[] memory executors = new BootstrapConfig[](1); - - bytes memory recoveryModuleInstallData = abi.encode( - validatorAddr, - bytes("0"), - functionSelector, - guardians, - guardianWeights, - 0, - vm.envOr("RECOVERY_DELAY", uint256(1 seconds)), - vm.envOr("RECOVERY_EXPIRY", uint256(2 weeks)) - ); - executors[0] = - BootstrapConfig({ module: recoveryModuleAddr, data: recoveryModuleInstallData }); - BootstrapConfig memory hookConfig = BootstrapConfig({ module: hookAddr, data: bytes("") }); - BootstrapConfig[] memory fallbacks = new BootstrapConfig[](0); - bytes memory _initCode = - bootstrap._getInitMSACalldata(validators, executors, hookConfig, fallbacks); - account = msaFactory.getAddress(accountSalt, _initCode); - console.log("Account address", account); - console.log("Account code size", account.code.length); - initCode = abi.encodePacked( - address(msaFactory), - abi.encodeWithSelector(msaFactory.createAccount.selector, accountSalt, _initCode) - ); - - { - // Add an EmailAuth guardian - address guardianAddr = EmailAccountRecovery(recoveryModuleAddr).computeEmailAuthAddress( - account, accountSalt - ); - console.log("Guardian's EmailAuth address", guardianAddr); - userOpCalldata = abi.encodeCall( - IERC7579Account.execute, - ( - ModeLib.encodeSimpleSingle(), - ExecutionLib.encodeSingle( - address(recoveryModuleAddr), - uint256(0), - abi.encodeCall(IGuardianManager.addGuardian, (guardianAddr, 1)) - ) - ) - ); - } - console.log("nonce", getNonce(account, validatorAddr)); - userOp = PackedUserOperation({ - sender: account, - nonce: getNonce(account, validatorAddr), - initCode: initCode, - callData: userOpCalldata, - accountGasLimits: bytes32(abi.encodePacked(uint128(1e6), uint128(3e5))), - preVerificationGas: 1e5, - gasFees: bytes32(abi.encodePacked(uint128(0), uint128(0))), - paymasterAndData: bytes(""), - signature: bytes("") - }); - { - userOpHash = IEntryPoint(ENTRYPOINT_ADDR).getUserOpHash(userOp); - (uint8 v, bytes32 r, bytes32 s) = - vm.sign(privKey, ECDSA.toEthSignedMessageHash(userOpHash)); - userOp.signature = abi.encodePacked(r, s, v); - } - - PackedUserOperation[] memory userOps = new PackedUserOperation[](1); - userOps[0] = userOp; - console.log("init userOps are ready"); - IEntryPoint(ENTRYPOINT_ADDR).handleOps{ gas: 1e6 }(userOps, payable(deployer)); - console.log("init UserOps are executed"); - - // set threshold to 1. - { - // Add an EmailAuth guardian - address guardianAddr = EmailAccountRecovery(recoveryModuleAddr).computeEmailAuthAddress( - account, accountSalt - ); - console.log("Guardian's EmailAuth address", guardianAddr); - userOpCalldata = abi.encodeCall( - IERC7579Account.execute, - ( - ModeLib.encodeSimpleSingle(), - ExecutionLib.encodeSingle( - address(recoveryModuleAddr), - uint256(0), - abi.encodeCall(IGuardianManager.changeThreshold, 1) - ) - ) - ); - } - userOp = PackedUserOperation({ - sender: account, - nonce: getNonce(account, validatorAddr), - initCode: bytes(""), - callData: userOpCalldata, - accountGasLimits: bytes32(abi.encodePacked(uint128(1e5), uint128(1e6))), - preVerificationGas: 1e5, - gasFees: bytes32(abi.encodePacked(uint128(0), uint128(0))), - paymasterAndData: bytes(""), - signature: bytes("") - }); - { - userOpHash = IEntryPoint(ENTRYPOINT_ADDR).getUserOpHash(userOp); - (uint8 v, bytes32 r, bytes32 s) = - vm.sign(privKey, ECDSA.toEthSignedMessageHash(userOpHash)); - userOp.signature = abi.encodePacked(r, s, v); - } - userOps = new PackedUserOperation[](1); - userOps[0] = userOp; - console.log("changeThreshold userOps are ready"); - IEntryPoint(ENTRYPOINT_ADDR).handleOps{ gas: 3e6 }(userOps, payable(deployer)); - console.log("changeThreshold UserOps are executed"); - - vm.stopBroadcast(); - } - - function getNonce( - address smartAccount, - address validator - ) - internal - view - returns (uint256 nonce) - { - uint192 key = uint192(bytes24(bytes20(address(validator)))); - nonce = IEntryPoint(ENTRYPOINT_ADDR).getNonce(address(smartAccount), key); - } -} diff --git a/script/DeploySafeNativeRecoveryWithAccountHiding.s.sol b/script/DeploySafeNativeRecoveryWithAccountHiding.s.sol index bbcfb272..2ef58174 100644 --- a/script/DeploySafeNativeRecoveryWithAccountHiding.s.sol +++ b/script/DeploySafeNativeRecoveryWithAccountHiding.s.sol @@ -15,7 +15,7 @@ contract DeploySafeNativeRecovery_Script is BaseDeployScript { function run() public override { super.run(); vm.startBroadcast(vm.envUint("PRIVATE_KEY")); - address verifier = vm.envOr("ZK_VERIFIER", address(0)); + address verifier = vm.envOr("VERIFIER", address(0)); address dkimRegistrySigner = vm.envOr("DKIM_SIGNER", address(0)); address emailAuthImpl = vm.envOr("EMAIL_AUTH_IMPL", address(0)); address commandHandler = vm.envOr("COMMAND_HANDLER", address(0)); @@ -51,7 +51,8 @@ contract DeploySafeNativeRecovery_Script is BaseDeployScript { } if (commandHandler == address(0)) { - commandHandler = address(new AccountHidingRecoveryCommandHandler{ salt: bytes32(salt) }()); + commandHandler = + address(new AccountHidingRecoveryCommandHandler{ salt: bytes32(salt) }()); console.log("Deployed Command Handler at", commandHandler); }