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 to latest modulekit #5

Merged
merged 3 commits into from
Dec 9, 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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rhinestone/module-template",
"version": "0.4.1",
"version": "0.4.2",
"description": "A Foundry template for building modules using the ModuleKit",
"license": "GPL-3.0",
"author": {
Expand All @@ -25,7 +25,7 @@
"test:optimized": "pnpm run build:optimized && FOUNDRY_PROFILE=test-optimized forge test"
},
"dependencies": {
"@rhinestone/modulekit": "^0.4.17"
"@rhinestone/modulekit": "^0.5.1"
},
"files": [
"src",
Expand Down
304 changes: 50 additions & 254 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
@rhinestone/=node_modules/@rhinestone/
sentinellist/=node_modules/@rhinestone/sentinellist/src/
erc4337-validation/=node_modules/@rhinestone/erc4337-validation/src/
safe7579/=node_modules/@rhinestone/safe7579/src/
modulekit/=node_modules/@rhinestone/modulekit/src/
module-bases/=node_modules/@rhinestone/module-bases/src/
registry/=node_modules/@rhinestone/registry/src/

@ERC4337/=node_modules/@ERC4337/
account-abstraction/=node_modules/@ERC4337/account-abstraction/contracts/
account-abstraction-v0.6/=node_modules/@ERC4337/account-abstraction-v0.6/contracts/

@openzeppelin/=node_modules/@openzeppelin/
@safe-global/=node_modules/@safe-global/
ds-test/=node_modules/ds-test/src/
erc7579/=node_modules/erc7579/src/
forge-std/=node_modules/forge-std/src/
solady/=node_modules/solady/src/
solarray/=node_modules/solarray/src/
@prb/math/=node_modules/@prb/math/src/
kernel/=node_modules/@zerodev/kernel/src/
ExcessivelySafeCall/=node_modules/excessively-safe-call/src/
2 changes: 1 addition & 1 deletion script/DeployModule.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.23;

import "forge-std/Script.sol";
import { RegistryDeployer } from "modulekit/deployment/RegistryDeployer.sol";
import { RegistryDeployer } from "modulekit/deployment/registry/RegistryDeployer.sol";

// Import modules here
import { ValidatorTemplate } from "src/ValidatorTemplate.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/ExecutorTemplate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.23;

import { ERC7579ExecutorBase } from "modulekit/Modules.sol";
import { IERC7579Account } from "modulekit/Accounts.sol";
import { ModeLib } from "erc7579/lib/ModeLib.sol";
import { ModeLib } from "modulekit/accounts/common/lib/ModeLib.sol";

contract ExecutorTemplate is ERC7579ExecutorBase {
/*//////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 0 additions & 1 deletion src/ValidatorTemplate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
* for more details)
*/
function validateUserOp(
PackedUserOperation calldata userOp,

Check warning on line 55 in src/ValidatorTemplate.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Variable "userOp" is unused
bytes32 userOpHash

Check warning on line 56 in src/ValidatorTemplate.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Variable "userOpHash" is unused
)
external
view
Expand All @@ -75,8 +75,8 @@
* - EIP1271_FAILED if the signature is invalid
*/
function isValidSignatureWithSender(
address sender,

Check warning on line 78 in src/ValidatorTemplate.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Variable "sender" is unused
bytes32 hash,

Check warning on line 79 in src/ValidatorTemplate.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Variable "hash" is unused
bytes calldata signature
)
external
Expand Down Expand Up @@ -104,7 +104,6 @@
external
view
virtual
override
returns (bool validSig)
{
return false;
Expand Down
12 changes: 3 additions & 9 deletions test/ExecutorTemplate.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@
pragma solidity ^0.8.23;

import { Test } from "forge-std/Test.sol";
import {
RhinestoneModuleKit,
ModuleKitHelpers,
ModuleKitUserOp,
AccountInstance
} from "modulekit/ModuleKit.sol";
import { MODULE_TYPE_EXECUTOR } from "modulekit/external/ERC7579.sol";
import { ExecutionLib } from "erc7579/lib/ExecutionLib.sol";
import { RhinestoneModuleKit, ModuleKitHelpers, AccountInstance } from "modulekit/ModuleKit.sol";
import { MODULE_TYPE_EXECUTOR } from "modulekit/accounts/common/interfaces/IERC7579Module.sol";
import { ExecutionLib } from "modulekit/accounts/erc7579/lib/ExecutionLib.sol";
import { ExecutorTemplate } from "src/ExecutorTemplate.sol";

contract ExecutorTemplateTest is RhinestoneModuleKit, Test {
using ModuleKitHelpers for *;
using ModuleKitUserOp for *;

// account and modules
AccountInstance internal instance;
Expand Down
10 changes: 2 additions & 8 deletions test/HookTemplate.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@
pragma solidity ^0.8.23;

import { Test } from "forge-std/Test.sol";
import {
RhinestoneModuleKit,
ModuleKitHelpers,
ModuleKitUserOp,
AccountInstance
} from "modulekit/ModuleKit.sol";
import { MODULE_TYPE_HOOK } from "modulekit/external/ERC7579.sol";
import { RhinestoneModuleKit, ModuleKitHelpers, AccountInstance } from "modulekit/ModuleKit.sol";
import { MODULE_TYPE_HOOK } from "modulekit/accounts/common/interfaces/IERC7579Module.sol";
import { HookTemplate } from "src/HookTemplate.sol";

contract HookTemplateTest is RhinestoneModuleKit, Test {
using ModuleKitHelpers for *;
using ModuleKitUserOp for *;

// account and modules
AccountInstance internal instance;
Expand Down
4 changes: 1 addition & 3 deletions test/ValidatorTemplate.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import { Test } from "forge-std/Test.sol";
import {
RhinestoneModuleKit,
ModuleKitHelpers,
ModuleKitUserOp,
AccountInstance,
UserOpData
} from "modulekit/ModuleKit.sol";
import { MODULE_TYPE_VALIDATOR } from "modulekit/external/ERC7579.sol";
import { MODULE_TYPE_VALIDATOR } from "modulekit/accounts/common/interfaces/IERC7579Module.sol";
import { ValidatorTemplate } from "src/ValidatorTemplate.sol";

contract ValidatorTemplateTest is RhinestoneModuleKit, Test {
using ModuleKitHelpers for *;
using ModuleKitUserOp for *;

// account and modules
AccountInstance internal instance;
Expand Down
Loading