Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update module bases dep #162

Merged
merged 6 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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#6ed072249860c7143d3f29b153187ab6d5924e84",
"@rhinestone/safe7579": "github:rhinestonewtf/safe7579#v1.0.0",
"@rhinestone/sentinellist": "github:rhinestonewtf/sentinellist",
"@rhinestone/registry": "github:rhinestonewtf/registry#v1.0",
Expand Down
89 changes: 68 additions & 21 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/Mocks.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { MockPolicy } from "module-bases/mocks/MockPolicy.sol";
//////////////////////////////////////////////////////////////*/

import { MockValidator } from "module-bases/mocks/MockValidator.sol";
import { MockStatelessValidator } from "module-bases/mocks/MockStatelessValidator.sol";
highskore marked this conversation as resolved.
Show resolved Hide resolved
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";
Expand Down
1 change: 1 addition & 0 deletions src/Modules.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/accounts/erc7579/ERC7579Factory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
4 changes: 2 additions & 2 deletions src/accounts/kernel/KernelFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/accounts/nexus/NexusFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/accounts/nexus/interfaces/INexusBootstrap.sol
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/accounts/safe/SafeFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/registry/ExampleFactory.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/registry/FactoryBase.sol
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/test/RhinestoneModuleKit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -76,7 +76,7 @@ contract RhinestoneModuleKit is AuxiliaryFactory {
//////////////////////////////////////////////////////////////////////////*/

MockValidator public _defaultValidator;
MockValidator public _defaultSessionValidator;
MockStatelessValidator public _defaultSessionValidator;
bool public isInit;

/*//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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");
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/precompiles/NexusPrecompiles.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
3 changes: 1 addition & 2 deletions test/Diff.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion test/mocks/MockValidatorFalse.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 { }
Expand Down
Loading