From 82cc5f261b3fcd1f613f6bd6d6a0fa302dd29340 Mon Sep 17 00:00:00 2001 From: highskore Date: Thu, 21 Nov 2024 12:51:42 +0100 Subject: [PATCH 1/6] chore: update module bases dep --- package.json | 2 +- pnpm-lock.yaml | 83 +++++++++++++++++++++++-------- src/Mocks.sol | 1 + src/Modules.sol | 1 + src/test/RhinestoneModuleKit.sol | 6 +-- test/Diff.t.sol | 3 +- test/mocks/MockValidatorFalse.sol | 3 +- 7 files changed, 71 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 734b933f..3e625364 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@ERC4337/account-abstraction-v0.6": "github:eth-infinitism/account-abstraction#v0.6.0", "@prb/math": "^4.0.2", "@rhinestone/erc4337-validation": "^0.0.4", - "@rhinestone/module-bases": "github:rhinestonewtf/module-bases#d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7", + "@rhinestone/module-bases": "github:rhinestonewtf/module-bases#a85e120eadb3c6a0c3934f94dd013de7f67f088b", "@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 39b3a023..430efdd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: ^0.0.4 version: 0.0.4(ethers@5.7.2)(hardhat@2.22.15(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@rhinestone/module-bases': - specifier: github:rhinestonewtf/module-bases#d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7 - version: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/d048ec28c8ea8b4155db3ce4f027bc64cd41f9a7(ethers@5.7.2)(hardhat@2.22.15(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) + specifier: github:rhinestonewtf/module-bases#a85e120eadb3c6a0c3934f94dd013de7f67f088b + version: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/a85e120eadb3c6a0c3934f94dd013de7f67f088b(ethers@5.7.2)(hardhat@2.22.15(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 @@ -404,8 +404,8 @@ packages: '@prb/math@4.1.0': resolution: {integrity: sha512-ef5Xrlh3BeX4xT5/Wi810dpEPq2bYPndRxgFIaKSU1F/Op/s8af03kyom+mfU7gEpvfIZ46xu8W0duiHplbBMg==} - '@rhinestone/checknsignatures@https://codeload.github.com/rhinestonewtf/checknsignatures/tar.gz/7ff44ef46da1266374e6a98e6cf69d727d7c357d': - resolution: {tarball: https://codeload.github.com/rhinestonewtf/checknsignatures/tar.gz/7ff44ef46da1266374e6a98e6cf69d727d7c357d} + '@rhinestone/checknsignatures@https://codeload.github.com/rhinestonewtf/checknsignatures/tar.gz/ef8e54b1df861681059b60be32ef9576030ea984': + resolution: {tarball: https://codeload.github.com/rhinestonewtf/checknsignatures/tar.gz/ef8e54b1df861681059b60be32ef9576030ea984} version: 0.0.1 '@rhinestone/erc4337-validation@0.0.1-alpha.2': @@ -414,12 +414,12 @@ packages: '@rhinestone/erc4337-validation@0.0.4': resolution: {integrity: sha512-9GPvOvmM9j5ZZRCFeujPacUyByRnrGL22/5177hRzXh5mLq/A22EyvVIVNcsWMvNiLcHAV4dkkKpXaljxNOT9A==} - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/70f0833756653579be6a95ea48e49a5090e2ff48': - resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/70f0833756653579be6a95ea48e49a5090e2ff48} + '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/1ea072eb328dd4bb1a540a52432ef98562314121': + resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/1ea072eb328dd4bb1a540a52432ef98562314121} 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} + '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/a85e120eadb3c6a0c3934f94dd013de7f67f088b': + resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/a85e120eadb3c6a0c3934f94dd013de7f67f088b} version: 0.0.1 '@rhinestone/registry@https://codeload.github.com/rhinestonewtf/registry/tar.gz/1371979a97293e0c6188afcd923784f6a718ae7d': @@ -434,6 +434,10 @@ packages: resolution: {tarball: https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/67e42f0eb3cf355ddba5a017892f9cc28d924875} version: 1.0.1 + '@rhinestone/sentinellist@https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/e722c5cc68c570d535bc3c9f85b3ce90cdc38807': + resolution: {tarball: https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/e722c5cc68c570d535bc3c9f85b3ce90cdc38807} + version: 1.0.1 + '@safe-global/safe-contracts@1.4.1': resolution: {integrity: sha512-fP1jewywSwsIniM04NsqPyVRFKPMAuirC3ftA/TA4X3Zc5EnwQp/UCJUU2PL/37/z/jMo8UUaJ+pnFNWmMU7dQ==} peerDependencies: @@ -944,6 +948,10 @@ 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/c47765c69e415184250df3d118ec5e89f4e44fee: + resolution: {tarball: https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/c47765c69e415184250df3d118ec5e89f4e44fee} + version: 0.3.1 + error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -1096,6 +1104,10 @@ packages: debug: optional: true + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/2b59872eee0b8088ddcade39fe8c041e17bb79c0: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/2b59872eee0b8088ddcade39fe8c041e17bb79c0} + version: 1.9.4 + 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 @@ -1947,6 +1959,10 @@ packages: resolution: {tarball: https://codeload.github.com/vectorized/solady/tar.gz/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e} version: 0.0.168 + solady@https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2: + resolution: {tarball: https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2} + version: 0.0.269 + solarray@https://codeload.github.com/sablier-labs/solarray/tar.gz/6bf10cb34cdace52a3ba5fe437e78cc82df92684: resolution: {tarball: https://codeload.github.com/sablier-labs/solarray/tar.gz/6bf10cb34cdace52a3ba5fe437e78cc82df92684} version: 1.0.0 @@ -2828,10 +2844,10 @@ snapshots: '@prb/math@4.1.0': {} - '@rhinestone/checknsignatures@https://codeload.github.com/rhinestonewtf/checknsignatures/tar.gz/7ff44ef46da1266374e6a98e6cf69d727d7c357d': + '@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/0c60a26df3a34004006194ccc9fbf8e21be5c9bc + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/2b59872eee0b8088ddcade39fe8c041e17bb79c0 + solady: https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2 '@rhinestone/erc4337-validation@0.0.1-alpha.2(ethers@5.7.2)(hardhat@2.22.15(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5)': dependencies: @@ -2839,9 +2855,9 @@ snapshots: account-abstraction: accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.15(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.15(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/2b59872eee0b8088ddcade39fe8c041e17bb79c0 prettier: 2.8.8 - solady: https://codeload.github.com/vectorized/solady/tar.gz/0c60a26df3a34004006194ccc9fbf8e21be5c9bc + solady: https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2 solhint: 4.5.4(typescript@4.9.5) transitivePeerDependencies: - bufferutil @@ -2873,11 +2889,11 @@ snapshots: - typechain - utf-8-validate - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/70f0833756653579be6a95ea48e49a5090e2ff48(ethers@5.7.2)(hardhat@2.22.15(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/1ea072eb328dd4bb1a540a52432ef98562314121(ethers@5.7.2)(hardhat@2.22.15(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.15(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.15(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 + erc7579: erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/c47765c69e415184250df3d118ec5e89f4e44fee(ethers@5.7.2)(hardhat@2.22.15(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/2b59872eee0b8088ddcade39fe8c041e17bb79c0 transitivePeerDependencies: - bufferutil - encoding @@ -2888,11 +2904,11 @@ 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.15(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/a85e120eadb3c6a0c3934f94dd013de7f67f088b(ethers@5.7.2)(hardhat@2.22.15(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.15(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.15(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 + erc7579: erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/c47765c69e415184250df3d118ec5e89f4e44fee(ethers@5.7.2)(hardhat@2.22.15(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/2b59872eee0b8088ddcade39fe8c041e17bb79c0 transitivePeerDependencies: - bufferutil - encoding @@ -2913,9 +2929,9 @@ snapshots: dependencies: '@ERC4337/account-abstraction': accountabstraction@https://codeload.github.com/kopy-kat/account-abstraction/tar.gz/c5887153fbfe3ed09b2637cac39873f96d676f38(ethers@5.7.2)(hardhat@2.22.15(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.15(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/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.15(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/70f0833756653579be6a95ea48e49a5090e2ff48(ethers@5.7.2)(hardhat@2.22.15(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/1ea072eb328dd4bb1a540a52432ef98562314121(ethers@5.7.2)(hardhat@2.22.15(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 @@ -2938,6 +2954,10 @@ snapshots: dependencies: forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/da591f56d8884c5824c0c1b3103fbcfd81123c4c + '@rhinestone/sentinellist@https://codeload.github.com/rhinestonewtf/sentinellist/tar.gz/e722c5cc68c570d535bc3c9f85b3ce90cdc38807': + dependencies: + forge-std: https://codeload.github.com/foundry-rs/forge-std/tar.gz/2b59872eee0b8088ddcade39fe8c041e17bb79c0 + '@safe-global/safe-contracts@1.4.1(ethers@5.7.2)': dependencies: ethers: 5.7.2 @@ -3577,6 +3597,23 @@ snapshots: - typechain - utf-8-validate + erc7579-implementation@https://codeload.github.com/erc7579/erc7579-implementation/tar.gz/c47765c69e415184250df3d118ec5e89f4e44fee(ethers@5.7.2)(hardhat@2.22.15(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.15(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/2b59872eee0b8088ddcade39fe8c041e17bb79c0 + solady: https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2 + transitivePeerDependencies: + - bufferutil + - encoding + - ethers + - hardhat + - lodash + - supports-color + - typechain + - utf-8-validate + error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 @@ -3794,6 +3831,8 @@ snapshots: optionalDependencies: debug: 4.3.7(supports-color@8.1.1) + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/2b59872eee0b8088ddcade39fe8c041e17bb79c0: {} + 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: {} @@ -4702,6 +4741,8 @@ snapshots: solady@https://codeload.github.com/vectorized/solady/tar.gz/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e: {} + solady@https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2: {} + solarray@https://codeload.github.com/sablier-labs/solarray/tar.gz/6bf10cb34cdace52a3ba5fe437e78cc82df92684: {} solc@0.8.26(debug@4.3.7): diff --git a/src/Mocks.sol b/src/Mocks.sol index f5d7f48f..8bcccf74 100644 --- a/src/Mocks.sol +++ b/src/Mocks.sol @@ -16,6 +16,7 @@ import { MockPolicy } from "module-bases/mocks/MockPolicy.sol"; //////////////////////////////////////////////////////////////*/ import { MockValidator } from "module-bases/mocks/MockValidator.sol"; +import { MockStatelessValidator } from "module-bases/mocks/MockStatelessValidator.sol"; import { MockExecutor } from "module-bases/mocks/MockExecutor.sol"; import { MockHook } from "module-bases/mocks/MockHook.sol"; import { MockFallback } from "module-bases/mocks/MockFallback.sol"; diff --git a/src/Modules.sol b/src/Modules.sol index 38adbb58..77bfbb09 100644 --- a/src/Modules.sol +++ b/src/Modules.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.23; /* solhint-disable no-unused-import */ import { ERC7579ValidatorBase } from "module-bases/ERC7579ValidatorBase.sol"; +import { ERC7579StatelessValidatorBase } from "module-bases/ERC7579StatelessValidatorBase.sol"; import { ERC7579ExecutorBase } from "module-bases/ERC7579ExecutorBase.sol"; import { ERC7579HookBase } from "module-bases/ERC7579HookBase.sol"; import { ERC7579HookDestruct } from "module-bases/ERC7579HookDestruct.sol"; diff --git a/src/test/RhinestoneModuleKit.sol b/src/test/RhinestoneModuleKit.sol index ba0f0026..1382905a 100644 --- a/src/test/RhinestoneModuleKit.sol +++ b/src/test/RhinestoneModuleKit.sol @@ -18,7 +18,7 @@ import { ENTRYPOINT_ADDR } from "./predeploy/EntryPoint.sol"; import { SMARTSESSION_ADDR } from "./precompiles/SmartSessions.sol"; import { ISmartSession, ISessionValidator } from "src/test/helpers/interfaces/ISmartSession.sol"; import { IERC7579Validator } from "../external/ERC7579.sol"; -import { MockValidator } from "../Mocks.sol"; +import { MockValidator, MockStatelessValidator } from "../Mocks.sol"; import { getAccountEnv, getHelper, @@ -76,7 +76,7 @@ contract RhinestoneModuleKit is AuxiliaryFactory { //////////////////////////////////////////////////////////////////////////*/ MockValidator public _defaultValidator; - MockValidator public _defaultSessionValidator; + MockStatelessValidator public _defaultSessionValidator; bool public isInit; /*////////////////////////////////////////////////////////////////////////// @@ -301,7 +301,7 @@ contract RhinestoneModuleKit is AuxiliaryFactory { label(address(_defaultValidator), "DefaultValidator"); // Set session validator - _defaultSessionValidator = new MockValidator(); + _defaultSessionValidator = new MockStatelessValidator(); label(address(_defaultSessionValidator), "SessionValidator"); } diff --git a/test/Diff.t.sol b/test/Diff.t.sol index 0355db39..cf7e0ec7 100644 --- a/test/Diff.t.sol +++ b/test/Diff.t.sol @@ -169,8 +169,7 @@ contract ERC7579DifferentialModuleKitLibTest is BaseTest { revertSelector = abi.encodePacked(bytes4(0xf21e646b)); revertMessage = abi.encodePacked(bytes4(0xf21e646b)); } else { - revertSelector = abi.encodePacked(bytes4(0x08c379a0)); - revertMessage = abi.encodeWithSignature("Error(string)", "MockTarget: not authorized"); + revertSelector = abi.encodePacked(bytes4(0x82b42900)); } // Revert selector diff --git a/test/mocks/MockValidatorFalse.sol b/test/mocks/MockValidatorFalse.sol index ac287f0f..143a8b0b 100644 --- a/test/mocks/MockValidatorFalse.sol +++ b/test/mocks/MockValidatorFalse.sol @@ -2,10 +2,11 @@ pragma solidity ^0.8.23; /* solhint-disable no-unused-vars */ +import { ERC7579StatelessValidatorBase } from "src/Modules.sol"; import { ERC7579ValidatorBase } from "src/Modules.sol"; import { PackedUserOperation } from "src/external/ERC4337.sol"; -contract MockValidatorFalse is ERC7579ValidatorBase { +contract MockValidatorFalse is ERC7579StatelessValidatorBase, ERC7579ValidatorBase { function onInstall(bytes calldata data) external virtual override { } function onUninstall(bytes calldata data) external virtual override { } From 33e63439a7ad5ebe1bba5e9134aa5612b817e1e1 Mon Sep 17 00:00:00 2001 From: highskore Date: Thu, 21 Nov 2024 13:12:40 +0100 Subject: [PATCH 2/6] chore: use relative imports --- src/accounts/nexus/interfaces/INexusBootstrap.sol | 2 +- src/integrations/registry/ExampleFactory.sol | 2 +- src/test/helpers/ERC7579Helpers.sol | 2 +- src/test/helpers/KernelHelpers.sol | 2 +- src/test/helpers/NexusHelpers.sol | 2 +- src/test/helpers/SafeHelpers.sol | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/accounts/nexus/interfaces/INexusBootstrap.sol b/src/accounts/nexus/interfaces/INexusBootstrap.sol index 0437d5fd..5b06d00d 100644 --- a/src/accounts/nexus/interfaces/INexusBootstrap.sol +++ b/src/accounts/nexus/interfaces/INexusBootstrap.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { IERC7579Module } from "src/external/ERC7579.sol"; +import { IERC7579Module } from "../../../external/ERC7579.sol"; import { IERC7484 } from "src/Interfaces.sol"; struct BootstrapConfig { diff --git a/src/integrations/registry/ExampleFactory.sol b/src/integrations/registry/ExampleFactory.sol index 49af526a..a1dbd847 100644 --- a/src/integrations/registry/ExampleFactory.sol +++ b/src/integrations/registry/ExampleFactory.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.25; -import { IMSA, ERC7579Bootstrap, IERC7579Module } from "src/external/ERC7579.sol"; +import { IMSA, ERC7579Bootstrap, IERC7579Module } from "../../external/ERC7579.sol"; import { FactoryBase } from "./FactoryBase.sol"; import { IMSA } from "erc7579/interfaces/IMSA.sol"; import { MSAProxy } from "erc7579/utils/MSAProxy.sol"; diff --git a/src/test/helpers/ERC7579Helpers.sol b/src/test/helpers/ERC7579Helpers.sol index f3e9c41e..bf1ebf8f 100644 --- a/src/test/helpers/ERC7579Helpers.sol +++ b/src/test/helpers/ERC7579Helpers.sol @@ -6,7 +6,7 @@ import { AccountInstance } from "../RhinestoneModuleKit.sol"; import { HelperBase } from "./HelperBase.sol"; import { IAccountModulesPaginated } from "./interfaces/IAccountModulesPaginated.sol"; import { IERC1271, EIP1271_MAGIC_VALUE } from "src/Interfaces.sol"; -import { CallType } from "src/external/ERC7579.sol"; +import { CallType } from "../../external/ERC7579.sol"; contract ERC7579Helpers is HelperBase { /*////////////////////////////////////////////////////////////////////////// diff --git a/src/test/helpers/KernelHelpers.sol b/src/test/helpers/KernelHelpers.sol index 94a15fda..3975debe 100644 --- a/src/test/helpers/KernelHelpers.sol +++ b/src/test/helpers/KernelHelpers.sol @@ -24,7 +24,7 @@ import { Kernel } from "kernel/Kernel.sol"; import { etch } from "../utils/Vm.sol"; import { IValidator, IModule } from "kernel/interfaces/IERC7579Modules.sol"; import { IERC1271, EIP1271_MAGIC_VALUE } from "src/Interfaces.sol"; -import { CallType, Execution } from "src/external/ERC7579.sol"; +import { CallType, Execution } from "../../external/ERC7579.sol"; import { MockHookMultiPlexer } from "src/Mocks.sol"; import { TrustedForwarder } from "src/Modules.sol"; import { PackedUserOperation } from "src/external/ERC4337.sol"; diff --git a/src/test/helpers/NexusHelpers.sol b/src/test/helpers/NexusHelpers.sol index 85e35593..ea45ce6a 100644 --- a/src/test/helpers/NexusHelpers.sol +++ b/src/test/helpers/NexusHelpers.sol @@ -6,7 +6,7 @@ import { AccountInstance } from "../RhinestoneModuleKit.sol"; import { HelperBase } from "./HelperBase.sol"; import { IAccountModulesPaginated } from "./interfaces/IAccountModulesPaginated.sol"; import { IERC1271, EIP1271_MAGIC_VALUE } from "src/Interfaces.sol"; -import { CallType } from "src/external/ERC7579.sol"; +import { CallType } from "../../external/ERC7579.sol"; contract NexusHelpers is HelperBase { /*////////////////////////////////////////////////////////////////////////// diff --git a/src/test/helpers/SafeHelpers.sol b/src/test/helpers/SafeHelpers.sol index 82ae9474..ef243eb5 100644 --- a/src/test/helpers/SafeHelpers.sol +++ b/src/test/helpers/SafeHelpers.sol @@ -19,7 +19,7 @@ import { IAccountModulesPaginated } from "./interfaces/IAccountModulesPaginated. import { CALLTYPE_STATIC } from "safe7579/lib/ModeLib.sol"; import { IERC1271, EIP1271_MAGIC_VALUE } from "src/Interfaces.sol"; import { startPrank, stopPrank } from "../utils/Vm.sol"; -import { CallType } from "src/external/ERC7579.sol"; +import { CallType } from "../../external/ERC7579.sol"; contract SafeHelpers is HelperBase { /*////////////////////////////////////////////////////////////////////////// From 9e10db0d46f4210e79f0b8798375fab6a0bd1351 Mon Sep 17 00:00:00 2001 From: highskore Date: Thu, 21 Nov 2024 13:16:49 +0100 Subject: [PATCH 3/6] Revert "chore: use relative imports" This reverts commit 33e63439a7ad5ebe1bba5e9134aa5612b817e1e1. --- src/accounts/nexus/interfaces/INexusBootstrap.sol | 2 +- src/integrations/registry/ExampleFactory.sol | 2 +- src/test/helpers/ERC7579Helpers.sol | 2 +- src/test/helpers/KernelHelpers.sol | 2 +- src/test/helpers/NexusHelpers.sol | 2 +- src/test/helpers/SafeHelpers.sol | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/accounts/nexus/interfaces/INexusBootstrap.sol b/src/accounts/nexus/interfaces/INexusBootstrap.sol index 5b06d00d..0437d5fd 100644 --- a/src/accounts/nexus/interfaces/INexusBootstrap.sol +++ b/src/accounts/nexus/interfaces/INexusBootstrap.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { IERC7579Module } from "../../../external/ERC7579.sol"; +import { IERC7579Module } from "src/external/ERC7579.sol"; import { IERC7484 } from "src/Interfaces.sol"; struct BootstrapConfig { diff --git a/src/integrations/registry/ExampleFactory.sol b/src/integrations/registry/ExampleFactory.sol index a1dbd847..49af526a 100644 --- a/src/integrations/registry/ExampleFactory.sol +++ b/src/integrations/registry/ExampleFactory.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.25; -import { IMSA, ERC7579Bootstrap, IERC7579Module } from "../../external/ERC7579.sol"; +import { IMSA, ERC7579Bootstrap, IERC7579Module } from "src/external/ERC7579.sol"; import { FactoryBase } from "./FactoryBase.sol"; import { IMSA } from "erc7579/interfaces/IMSA.sol"; import { MSAProxy } from "erc7579/utils/MSAProxy.sol"; diff --git a/src/test/helpers/ERC7579Helpers.sol b/src/test/helpers/ERC7579Helpers.sol index bf1ebf8f..f3e9c41e 100644 --- a/src/test/helpers/ERC7579Helpers.sol +++ b/src/test/helpers/ERC7579Helpers.sol @@ -6,7 +6,7 @@ import { AccountInstance } from "../RhinestoneModuleKit.sol"; import { HelperBase } from "./HelperBase.sol"; import { IAccountModulesPaginated } from "./interfaces/IAccountModulesPaginated.sol"; import { IERC1271, EIP1271_MAGIC_VALUE } from "src/Interfaces.sol"; -import { CallType } from "../../external/ERC7579.sol"; +import { CallType } from "src/external/ERC7579.sol"; contract ERC7579Helpers is HelperBase { /*////////////////////////////////////////////////////////////////////////// diff --git a/src/test/helpers/KernelHelpers.sol b/src/test/helpers/KernelHelpers.sol index 3975debe..94a15fda 100644 --- a/src/test/helpers/KernelHelpers.sol +++ b/src/test/helpers/KernelHelpers.sol @@ -24,7 +24,7 @@ import { Kernel } from "kernel/Kernel.sol"; import { etch } from "../utils/Vm.sol"; import { IValidator, IModule } from "kernel/interfaces/IERC7579Modules.sol"; import { IERC1271, EIP1271_MAGIC_VALUE } from "src/Interfaces.sol"; -import { CallType, Execution } from "../../external/ERC7579.sol"; +import { CallType, Execution } from "src/external/ERC7579.sol"; import { MockHookMultiPlexer } from "src/Mocks.sol"; import { TrustedForwarder } from "src/Modules.sol"; import { PackedUserOperation } from "src/external/ERC4337.sol"; diff --git a/src/test/helpers/NexusHelpers.sol b/src/test/helpers/NexusHelpers.sol index ea45ce6a..85e35593 100644 --- a/src/test/helpers/NexusHelpers.sol +++ b/src/test/helpers/NexusHelpers.sol @@ -6,7 +6,7 @@ import { AccountInstance } from "../RhinestoneModuleKit.sol"; import { HelperBase } from "./HelperBase.sol"; import { IAccountModulesPaginated } from "./interfaces/IAccountModulesPaginated.sol"; import { IERC1271, EIP1271_MAGIC_VALUE } from "src/Interfaces.sol"; -import { CallType } from "../../external/ERC7579.sol"; +import { CallType } from "src/external/ERC7579.sol"; contract NexusHelpers is HelperBase { /*////////////////////////////////////////////////////////////////////////// diff --git a/src/test/helpers/SafeHelpers.sol b/src/test/helpers/SafeHelpers.sol index ef243eb5..82ae9474 100644 --- a/src/test/helpers/SafeHelpers.sol +++ b/src/test/helpers/SafeHelpers.sol @@ -19,7 +19,7 @@ import { IAccountModulesPaginated } from "./interfaces/IAccountModulesPaginated. import { CALLTYPE_STATIC } from "safe7579/lib/ModeLib.sol"; import { IERC1271, EIP1271_MAGIC_VALUE } from "src/Interfaces.sol"; import { startPrank, stopPrank } from "../utils/Vm.sol"; -import { CallType } from "../../external/ERC7579.sol"; +import { CallType } from "src/external/ERC7579.sol"; contract SafeHelpers is HelperBase { /*////////////////////////////////////////////////////////////////////////// From ca7076a527ebd1b037952ce3924c61fb68e316ad Mon Sep 17 00:00:00 2001 From: highskore Date: Thu, 21 Nov 2024 18:06:43 +0100 Subject: [PATCH 4/6] chore: remove absolute imports --- package.json | 2 +- pnpm-lock.yaml | 20 ++++++++++++------- src/accounts/erc7579/ERC7579Factory.sol | 2 +- src/accounts/kernel/KernelFactory.sol | 4 ++-- src/accounts/nexus/NexusFactory.sol | 14 ++++++------- .../nexus/interfaces/INexusBootstrap.sol | 4 ++-- src/accounts/safe/SafeFactory.sol | 8 ++++---- src/integrations/registry/ExampleFactory.sol | 2 +- src/integrations/registry/FactoryBase.sol | 2 +- 9 files changed, 32 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 3e625364..98cef669 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@ERC4337/account-abstraction-v0.6": "github:eth-infinitism/account-abstraction#v0.6.0", "@prb/math": "^4.0.2", "@rhinestone/erc4337-validation": "^0.0.4", - "@rhinestone/module-bases": "github:rhinestonewtf/module-bases#a85e120eadb3c6a0c3934f94dd013de7f67f088b", + "@rhinestone/module-bases": "github:rhinestonewtf/module-bases#6ed072249860c7143d3f29b153187ab6d5924e84", "@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 430efdd7..219056a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: ^0.0.4 version: 0.0.4(ethers@5.7.2)(hardhat@2.22.15(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) '@rhinestone/module-bases': - specifier: github:rhinestonewtf/module-bases#a85e120eadb3c6a0c3934f94dd013de7f67f088b - version: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/a85e120eadb3c6a0c3934f94dd013de7f67f088b(ethers@5.7.2)(hardhat@2.22.15(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) + specifier: github:rhinestonewtf/module-bases#6ed072249860c7143d3f29b153187ab6d5924e84 + version: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/6ed072249860c7143d3f29b153187ab6d5924e84(ethers@5.7.2)(hardhat@2.22.15(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 @@ -418,8 +418,8 @@ packages: resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/1ea072eb328dd4bb1a540a52432ef98562314121} version: 0.0.1 - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/a85e120eadb3c6a0c3934f94dd013de7f67f088b': - resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/a85e120eadb3c6a0c3934f94dd013de7f67f088b} + '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/6ed072249860c7143d3f29b153187ab6d5924e84': + resolution: {tarball: https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/6ed072249860c7143d3f29b153187ab6d5924e84} version: 0.0.1 '@rhinestone/registry@https://codeload.github.com/rhinestonewtf/registry/tar.gz/1371979a97293e0c6188afcd923784f6a718ae7d': @@ -1955,6 +1955,10 @@ packages: resolution: {tarball: https://codeload.github.com/vectorized/solady/tar.gz/0c60a26df3a34004006194ccc9fbf8e21be5c9bc} version: 0.0.264 + solady@https://codeload.github.com/vectorized/solady/tar.gz/3fa3f106a8d99f4cca544e5dcb89bbb755ec6f29: + resolution: {tarball: https://codeload.github.com/vectorized/solady/tar.gz/3fa3f106a8d99f4cca544e5dcb89bbb755ec6f29} + version: 0.0.270 + solady@https://codeload.github.com/vectorized/solady/tar.gz/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e: resolution: {tarball: https://codeload.github.com/vectorized/solady/tar.gz/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e} version: 0.0.168 @@ -2847,7 +2851,7 @@ 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/2b59872eee0b8088ddcade39fe8c041e17bb79c0 - solady: https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2 + solady: https://codeload.github.com/vectorized/solady/tar.gz/3fa3f106a8d99f4cca544e5dcb89bbb755ec6f29 '@rhinestone/erc4337-validation@0.0.1-alpha.2(ethers@5.7.2)(hardhat@2.22.15(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5))(typescript@4.9.5)': dependencies: @@ -2904,7 +2908,7 @@ snapshots: - typechain - utf-8-validate - '@rhinestone/module-bases@https://codeload.github.com/rhinestonewtf/module-bases/tar.gz/a85e120eadb3c6a0c3934f94dd013de7f67f088b(ethers@5.7.2)(hardhat@2.22.15(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/6ed072249860c7143d3f29b153187ab6d5924e84(ethers@5.7.2)(hardhat@2.22.15(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.15(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/c47765c69e415184250df3d118ec5e89f4e44fee(ethers@5.7.2)(hardhat@2.22.15(typescript@4.9.5))(lodash@4.17.21)(typechain@5.2.0(typescript@4.9.5)) @@ -3603,7 +3607,7 @@ snapshots: account-abstraction: accountabstraction@https://codeload.github.com/eth-infinitism/account-abstraction/tar.gz/6f02f5a28a20e804d0410b4b5b570dd4b076dcf9(ethers@5.7.2)(hardhat@2.22.15(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/2b59872eee0b8088ddcade39fe8c041e17bb79c0 - solady: https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2 + solady: https://codeload.github.com/vectorized/solady/tar.gz/3fa3f106a8d99f4cca544e5dcb89bbb755ec6f29 transitivePeerDependencies: - bufferutil - encoding @@ -4739,6 +4743,8 @@ snapshots: solady@https://codeload.github.com/vectorized/solady/tar.gz/0c60a26df3a34004006194ccc9fbf8e21be5c9bc: {} + solady@https://codeload.github.com/vectorized/solady/tar.gz/3fa3f106a8d99f4cca544e5dcb89bbb755ec6f29: {} + solady@https://codeload.github.com/vectorized/solady/tar.gz/9deb9ed36a27261a8745db5b7cd7f4cdc3b1cd4e: {} solady@https://codeload.github.com/vectorized/solady/tar.gz/c39ad46f34429e52812bec243e6f41ab74059fc2: {} diff --git a/src/accounts/erc7579/ERC7579Factory.sol b/src/accounts/erc7579/ERC7579Factory.sol index 7e848eec..44e7cf5e 100644 --- a/src/accounts/erc7579/ERC7579Factory.sol +++ b/src/accounts/erc7579/ERC7579Factory.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.23; import "../../external/ERC7579.sol"; -import { IAccountFactory } from "src/accounts/interface/IAccountFactory.sol"; +import { IAccountFactory } from "../interface/IAccountFactory.sol"; import { IMSA } from "erc7579/interfaces/IMSA.sol"; import { MSAProxy } from "erc7579/utils/MSAProxy.sol"; diff --git a/src/accounts/kernel/KernelFactory.sol b/src/accounts/kernel/KernelFactory.sol index 84916aad..14e90f40 100644 --- a/src/accounts/kernel/KernelFactory.sol +++ b/src/accounts/kernel/KernelFactory.sol @@ -7,8 +7,8 @@ import { ENTRYPOINT_ADDR } from "../../test/predeploy/EntryPoint.sol"; import { ValidatorLib } from "kernel/utils/ValidationTypeLib.sol"; import { ValidationId } from "kernel/types/Types.sol"; import { IValidator, IHook } from "kernel/interfaces/IERC7579Modules.sol"; -import { IAccountFactory } from "src/accounts/interface/IAccountFactory.sol"; -import { MockHookMultiPlexer } from "src/Mocks.sol"; +import { IAccountFactory } from "../interface/IAccountFactory.sol"; +import { MockHookMultiPlexer } from "../../Mocks.sol"; contract KernelFactory is IAccountFactory { KernelAccountFactory internal factory; diff --git a/src/accounts/nexus/NexusFactory.sol b/src/accounts/nexus/NexusFactory.sol index 73daacc8..011416cf 100644 --- a/src/accounts/nexus/NexusFactory.sol +++ b/src/accounts/nexus/NexusFactory.sol @@ -2,20 +2,20 @@ pragma solidity ^0.8.24; // Interfaces -import { IAccountFactory } from "src/accounts/interface/IAccountFactory.sol"; -import { INexusAccountFactory } from "src/accounts/nexus/interfaces/INexusAccountFactory.sol"; +import { IAccountFactory } from "../interface/IAccountFactory.sol"; +import { INexusAccountFactory } from "../nexus/interfaces/INexusAccountFactory.sol"; import { INexusBootstrap, BootstrapConfig as NexusBootstrapConfig -} from "src/accounts/nexus/interfaces/INexusBootstrap.sol"; -import { IERC7484 } from "src/Interfaces.sol"; +} from "../nexus/interfaces/INexusBootstrap.sol"; +import { IERC7484 } from "../../Interfaces.sol"; // Constants -import { ENTRYPOINT_ADDR } from "src/test/predeploy/EntryPoint.sol"; -import { REGISTRY_ADDR } from "src/test/predeploy/Registry.sol"; +import { ENTRYPOINT_ADDR } from "../../test/predeploy/EntryPoint.sol"; +import { REGISTRY_ADDR } from "../../test/predeploy/Registry.sol"; // Utils -import { NexusPrecompiles } from "src/test/precompiles/NexusPrecompiles.sol"; +import { NexusPrecompiles } from "../../test/precompiles/NexusPrecompiles.sol"; contract NexusFactory is IAccountFactory { INexusAccountFactory internal factory; diff --git a/src/accounts/nexus/interfaces/INexusBootstrap.sol b/src/accounts/nexus/interfaces/INexusBootstrap.sol index 0437d5fd..a8a6394b 100644 --- a/src/accounts/nexus/interfaces/INexusBootstrap.sol +++ b/src/accounts/nexus/interfaces/INexusBootstrap.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { IERC7579Module } from "src/external/ERC7579.sol"; -import { IERC7484 } from "src/Interfaces.sol"; +import { IERC7579Module } from "../../../external/ERC7579.sol"; +import { IERC7484 } from "../../../Interfaces.sol"; struct BootstrapConfig { address module; diff --git a/src/accounts/safe/SafeFactory.sol b/src/accounts/safe/SafeFactory.sol index 23065609..7b3dd469 100644 --- a/src/accounts/safe/SafeFactory.sol +++ b/src/accounts/safe/SafeFactory.sol @@ -7,11 +7,11 @@ import { SafeProxy } from "@safe-global/safe-contracts/contracts/proxies/SafePro import { SafeProxyFactory } from "@safe-global/safe-contracts/contracts/proxies/SafeProxyFactory.sol"; import { Safe7579Launchpad, IERC7484, ModuleInit } from "safe7579/Safe7579Launchpad.sol"; -import { ENTRYPOINT_ADDR } from "src/test/predeploy/EntryPoint.sol"; -import { REGISTRY_ADDR } from "src/test/predeploy/Registry.sol"; -import { makeAddr } from "src/test/utils/Vm.sol"; +import { ENTRYPOINT_ADDR } from "../../test/predeploy/EntryPoint.sol"; +import { REGISTRY_ADDR } from "../../test/predeploy/Registry.sol"; +import { makeAddr } from "../../test/utils/Vm.sol"; import { Solarray } from "solarray/Solarray.sol"; -import { IAccountFactory } from "src/accounts/interface/IAccountFactory.sol"; +import { IAccountFactory } from "../interface/IAccountFactory.sol"; contract SafeFactory is IAccountFactory { // singletons diff --git a/src/integrations/registry/ExampleFactory.sol b/src/integrations/registry/ExampleFactory.sol index 49af526a..a1dbd847 100644 --- a/src/integrations/registry/ExampleFactory.sol +++ b/src/integrations/registry/ExampleFactory.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.25; -import { IMSA, ERC7579Bootstrap, IERC7579Module } from "src/external/ERC7579.sol"; +import { IMSA, ERC7579Bootstrap, IERC7579Module } from "../../external/ERC7579.sol"; import { FactoryBase } from "./FactoryBase.sol"; import { IMSA } from "erc7579/interfaces/IMSA.sol"; import { MSAProxy } from "erc7579/utils/MSAProxy.sol"; diff --git a/src/integrations/registry/FactoryBase.sol b/src/integrations/registry/FactoryBase.sol index a5a055b7..28bb2748 100644 --- a/src/integrations/registry/FactoryBase.sol +++ b/src/integrations/registry/FactoryBase.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.25; -import { IERC7484 } from "src/Interfaces.sol"; +import { IERC7484 } from "../../Interfaces.sol"; abstract contract FactoryBase { IERC7484 public immutable REGISTRY; From 708ed436904343de9fa9f63d897c3e5c3a2d485a Mon Sep 17 00:00:00 2001 From: highskore Date: Thu, 21 Nov 2024 18:16:01 +0100 Subject: [PATCH 5/6] fix: fix imports --- src/test/precompiles/NexusPrecompiles.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/precompiles/NexusPrecompiles.sol b/src/test/precompiles/NexusPrecompiles.sol index 4bc3919f..674ddf8a 100644 --- a/src/test/precompiles/NexusPrecompiles.sol +++ b/src/test/precompiles/NexusPrecompiles.sol @@ -2,8 +2,8 @@ pragma solidity ^0.8.24; // Interfaces -import { INexusAccountFactory } from "src/accounts/nexus/interfaces/INexusAccountFactory.sol"; -import { INexusBootstrap } from "src/accounts/nexus/interfaces/INexusBootstrap.sol"; +import { INexusAccountFactory } from "../../accounts/nexus/interfaces/INexusAccountFactory.sol"; +import { INexusBootstrap } from "../../accounts/nexus/interfaces/INexusBootstrap.sol"; // Utils import { label } from "src/test/utils/Vm.sol"; From dab17d782cc901bba4da7f19149fac924a619fe0 Mon Sep 17 00:00:00 2001 From: highskore Date: Fri, 22 Nov 2024 18:37:03 +0100 Subject: [PATCH 6/6] chore: import MockHybridValidator --- src/Mocks.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Mocks.sol b/src/Mocks.sol index 8bcccf74..246cf1b2 100644 --- a/src/Mocks.sol +++ b/src/Mocks.sol @@ -17,6 +17,7 @@ import { MockPolicy } from "module-bases/mocks/MockPolicy.sol"; import { MockValidator } from "module-bases/mocks/MockValidator.sol"; import { MockStatelessValidator } from "module-bases/mocks/MockStatelessValidator.sol"; +import { MockHybridValidator } from "module-bases/mocks/MockHybridValidator.sol"; import { MockExecutor } from "module-bases/mocks/MockExecutor.sol"; import { MockHook } from "module-bases/mocks/MockHook.sol"; import { MockFallback } from "module-bases/mocks/MockFallback.sol";