From b19558a8a8484e7b05fc3014d509697f5092951c Mon Sep 17 00:00:00 2001 From: highskore Date: Tue, 22 Oct 2024 20:04:21 +0200 Subject: [PATCH 1/4] fix: fix unassociated storage --- test/integrations/SmartSession.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integrations/SmartSession.t.sol b/test/integrations/SmartSession.t.sol index 1da364f2..74a54567 100644 --- a/test/integrations/SmartSession.t.sol +++ b/test/integrations/SmartSession.t.sol @@ -56,7 +56,7 @@ contract SmartSessionTest is BaseTest { // Deploy mock policy mockPolicy = new MockPolicy(); // Set the policy to allow any action - mockPolicy.setValidationData(0); + mockPolicy.setValidationData(address(instance.account), 0); // Deploy mock target target = new MockTarget(); } From 7791ae398df997967b9a222b38b449db3e852d36 Mon Sep 17 00:00:00 2001 From: highskore Date: Wed, 23 Oct 2024 10:18:41 +0200 Subject: [PATCH 2/4] chore: bump dependecy versions --- foundry.toml | 2 ++ package.json | 4 ++-- pnpm-lock.yaml | 30 ++++++++++++++++++------------ test/mocks/MockValidatorFalse.sol | 13 +++++++++++++ 4 files changed, 35 insertions(+), 14 deletions(-) diff --git a/foundry.toml b/foundry.toml index adef1f86..9f4c5a13 100644 --- a/foundry.toml +++ b/foundry.toml @@ -7,6 +7,8 @@ libs = ["node_modules"] fs_permissions = [{ access = "read", path = "out-optimized" }, { access = "read-write", path = "gas_calculations" }] allow_paths = ["*", "/"] ignored_warnings_from = ["node_modules", "src/integrations"] +gas_limit = "18446744073709551615" +memory_limit = 2147483648 [rpc_endpoints] mainnet = "${MAINNET_RPC_URL}" diff --git a/package.json b/package.json index fd56b1dc..ce77d3fe 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "@ERC4337/account-abstraction": "github:kopy-kat/account-abstraction#develop", "@ERC4337/account-abstraction-v0.6": "github:eth-infinitism/account-abstraction#v0.6.0", "@prb/math": "^4.0.2", - "@rhinestone/erc4337-validation": "^0.0.1-alpha.5", - "@rhinestone/module-bases": "github:rhinestonewtf/module-bases", + "@rhinestone/erc4337-validation": "^0.0.2", + "@rhinestone/module-bases": "github:rhinestonewtf/module-bases#d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7", "@rhinestone/safe7579": "github:rhinestonewtf/safe7579#v1.0.0", "@rhinestone/sentinellist": "github:rhinestonewtf/sentinellist", "@rhinestone/registry": "github:rhinestonewtf/registry#v1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 566b416e..ff1e49bd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,11 +18,11 @@ importers: specifier: ^4.0.2 version: 4.0.3 '@rhinestone/erc4337-validation': - specifier: ^0.0.1-alpha.5 - version: 0.0.1-alpha.5(ethers@5.7.2)(hardhat@2.22.13(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) + specifier: ^0.0.2 + version: 0.0.2(ethers@5.7.2)(hardhat@2.22.13(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@rhinestone/module-bases': - specifier: github:rhinestonewtf/module-bases - version: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/107cda409627e6f05285c7d8e1ea594d35fb3ac0(ethers@5.7.2)(hardhat@2.22.13(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) + specifier: github:rhinestonewtf/module-bases#d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7 + version: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7(ethers@5.7.2)(hardhat@2.22.13(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@rhinestone/registry': specifier: github:rhinestonewtf/registry#v1.0 version: https://codeload.github.com/rhinestonewtf/registry/tar.gz/1371979a97293e0c6188afcd923784f6a718ae7d @@ -415,11 +415,11 @@ packages: '@rhinestone/erc4337-validation@0.0.1-alpha.2': resolution: {integrity: sha512-sxBSHoR0hV0rN2bv5HfINHR3RyBChfd0OWH0TP8nlA9FolJ1EezLByxcyrvAgi2QLQ2Zf2zVcNky1qYdfF4NjQ==} - '@rhinestone/erc4337-validation@0.0.1-alpha.5': - resolution: {integrity: sha512-yOrYyQBrT0JfHb+rjvx4pqk8uItKxEtn7n8z3k0qbZTzkXaNS9pCUBsTxy0kp6T2SNUrbQ8I4DMSiyGqjdh2ng==} + '@rhinestone/erc4337-validation@0.0.2': + resolution: {integrity: sha512-IZi34ngoQeRuf7rPEWVBpokVLKpgd8lBZQ/sQ+bstGSlUHpf/jMcnhPIz1aJFCa9Mx7auzrAz8A/rD0GJj5z7A==} - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/107cda409627e6f05285c7d8e1ea594d35fb3ac0': - resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/107cda409627e6f05285c7d8e1ea594d35fb3ac0} + '@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/registry@https://codeload.github.com/rhinestonewtf/registry/tar.gz/1371979a97293e0c6188afcd923784f6a718ae7d': @@ -1098,6 +1098,10 @@ packages: resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1de6eecf821de7fe2c908cc48d3ab3dced20717f} version: 1.9.3 + 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/ae570fec082bfe1c1f45b0acca4a2b4f84d345ce: resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/ae570fec082bfe1c1f45b0acca4a2b4f84d345ce} version: 1.7.6 @@ -2854,13 +2858,13 @@ snapshots: - typescript - utf-8-validate - '@rhinestone/erc4337-validation@0.0.1-alpha.5(ethers@5.7.2)(hardhat@2.22.13(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))': + '@rhinestone/erc4337-validation@0.0.2(ethers@5.7.2)(hardhat@2.22.13(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.13(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.13(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/1de6eecf821de7fe2c908cc48d3ab3dced20717f + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/8a225d81aa8e2e013580564588c79abb65eacc9e prettier: 2.8.8 solady: https://codeload.github.com/vectorized/solady/tar.gz/7deab021af0426307ae79d091c4d1e26e9e89cf0 transitivePeerDependencies: @@ -2873,7 +2877,7 @@ snapshots: - typechain - utf-8-validate - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/107cda409627e6f05285c7d8e1ea594d35fb3ac0(ethers@5.7.2)(hardhat@2.22.13(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.13(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.13(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/b3f8bcb2df3aae3217213ffa8b7a87c1eb42ec56(ethers@5.7.2)(hardhat@2.22.13(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) @@ -2900,7 +2904,7 @@ 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.13(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/7ff44ef46da1266374e6a98e6cf69d727d7c357d '@rhinestone/erc4337-validation': 0.0.1-alpha.2(ethers@5.7.2)(hardhat@2.22.13(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/107cda409627e6f05285c7d8e1ea594d35fb3ac0(ethers@5.7.2)(hardhat@2.22.13(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.13(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/67e42f0eb3cf355ddba5a017892f9cc28d924875 '@safe-global/safe-contracts': 1.4.1(ethers@5.7.2) ds-test: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0 @@ -3781,6 +3785,8 @@ snapshots: forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1de6eecf821de7fe2c908cc48d3ab3dced20717f: {} + 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/ae570fec082bfe1c1f45b0acca4a2b4f84d345ce: {} form-data-encoder@2.1.4: {} diff --git a/test/mocks/MockValidatorFalse.sol b/test/mocks/MockValidatorFalse.sol index 0b032c64..94a3a91d 100644 --- a/test/mocks/MockValidatorFalse.sol +++ b/test/mocks/MockValidatorFalse.sol @@ -43,4 +43,17 @@ contract MockValidatorFalse is ERC7579ValidatorBase { function isInitialized(address smartAccount) external pure returns (bool) { return false; } + + function validateSignatureWithData( + bytes32, + bytes calldata, + bytes calldata + ) + external + view + override + returns (bool validSig) + { + return false; + } } From 13f584b142a1988f7b7acbc921e14cfc33aff01f Mon Sep 17 00:00:00 2001 From: highskore Date: Wed, 23 Oct 2024 10:24:27 +0200 Subject: [PATCH 3/4] chore: update default verbosity --- foundry.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/foundry.toml b/foundry.toml index 9f4c5a13..89d6aa8c 100644 --- a/foundry.toml +++ b/foundry.toml @@ -9,6 +9,7 @@ allow_paths = ["*", "/"] ignored_warnings_from = ["node_modules", "src/integrations"] gas_limit = "18446744073709551615" memory_limit = 2147483648 +verbosity = 3 [rpc_endpoints] mainnet = "${MAINNET_RPC_URL}" From 3c5342e59cdb8f2c09aaa316a2f6f1202cfd67e1 Mon Sep 17 00:00:00 2001 From: highskore Date: Wed, 23 Oct 2024 10:39:46 +0200 Subject: [PATCH 4/4] feat(ci): add test params --- .github/workflows/ci.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2dc199bf..9e668047 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,6 +19,9 @@ jobs: foundry-fuzz-runs: 5000 foundry-profile: "test" match-path: "test/**/*.sol" + foundry-verbosity: 3 + foundry-gas-limit: "18446744073709551615" + foundry-memory-limit: 2147483648 secrets: MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} TESTNET_RPC_URL: ${{ secrets.TESTNET_RPC_URL }} @@ -30,6 +33,9 @@ jobs: foundry-fuzz-runs: 5000 foundry-profile: "test" match-path: "test/**/*.sol" + foundry-verbosity: 3 + foundry-gas-limit: "18446744073709551615" + foundry-memory-limit: 2147483648 secrets: MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} TESTNET_RPC_URL: ${{ secrets.TESTNET_RPC_URL }} @@ -41,6 +47,9 @@ jobs: foundry-fuzz-runs: 5000 foundry-profile: "test" match-path: "test/**/*.sol" + foundry-verbosity: 3 + foundry-gas-limit: "18446744073709551615" + foundry-memory-limit: 2147483648 secrets: MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} TESTNET_RPC_URL: ${{ secrets.TESTNET_RPC_URL }}