From 89915537a46eca5cfc837c0caa621dc30eaff1fe Mon Sep 17 00:00:00 2001 From: zer0dot Date: Fri, 11 Oct 2024 18:19:20 -0400 Subject: [PATCH] chore: update snapshots and test --- .../ModularAccount_Runtime_Erc20Transfer.snap | 2 +- ...rAccount_Runtime_InstallSessionKey_Case1.snap | 2 +- .../ModularAccount_Runtime_NativeTransfer.snap | 2 +- ...ount_Runtime_UseSessionKey_Case1_Counter.snap | 2 +- ...ccount_Runtime_UseSessionKey_Case1_Token.snap | 2 +- .../ModularAccount_UserOp_Erc20Transfer.snap | 2 +- ...arAccount_UserOp_InstallSessionKey_Case1.snap | 2 +- .../ModularAccount_UserOp_NativeTransfer.snap | 2 +- ...count_UserOp_UseSessionKey_Case1_Counter.snap | 2 +- ...Account_UserOp_UseSessionKey_Case1_Token.snap | 2 +- ...ModularAccount_UserOp_deferredValidation.snap | 2 +- ...SemiModularAccount_Runtime_Erc20Transfer.snap | 2 +- ...rAccount_Runtime_InstallSessionKey_Case1.snap | 2 +- ...emiModularAccount_Runtime_NativeTransfer.snap | 2 +- ...ount_Runtime_UseSessionKey_Case1_Counter.snap | 2 +- ...ccount_Runtime_UseSessionKey_Case1_Token.snap | 2 +- .../SemiModularAccount_UserOp_Erc20Transfer.snap | 2 +- ...arAccount_UserOp_InstallSessionKey_Case1.snap | 2 +- ...SemiModularAccount_UserOp_NativeTransfer.snap | 2 +- ...count_UserOp_UseSessionKey_Case1_Counter.snap | 2 +- ...Account_UserOp_UseSessionKey_Case1_Token.snap | 2 +- ...ModularAccount_UserOp_deferredValidation.snap | 2 +- test/account/ExecutionInstallDelegate.t.sol | 16 ++++++++++++++++ 23 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 test/account/ExecutionInstallDelegate.t.sol diff --git a/.forge-snapshots/ModularAccount_Runtime_Erc20Transfer.snap b/.forge-snapshots/ModularAccount_Runtime_Erc20Transfer.snap index a2946c7ff..2d26265f7 100644 --- a/.forge-snapshots/ModularAccount_Runtime_Erc20Transfer.snap +++ b/.forge-snapshots/ModularAccount_Runtime_Erc20Transfer.snap @@ -1 +1 @@ -79922 +79359 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_Runtime_InstallSessionKey_Case1.snap b/.forge-snapshots/ModularAccount_Runtime_InstallSessionKey_Case1.snap index 834fd96d8..6b9cc7a08 100644 --- a/.forge-snapshots/ModularAccount_Runtime_InstallSessionKey_Case1.snap +++ b/.forge-snapshots/ModularAccount_Runtime_InstallSessionKey_Case1.snap @@ -1 +1 @@ -424617 +424000 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_Runtime_NativeTransfer.snap b/.forge-snapshots/ModularAccount_Runtime_NativeTransfer.snap index 0a924ea09..a50719122 100644 --- a/.forge-snapshots/ModularAccount_Runtime_NativeTransfer.snap +++ b/.forge-snapshots/ModularAccount_Runtime_NativeTransfer.snap @@ -1 +1 @@ -56044 +55481 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_Runtime_UseSessionKey_Case1_Counter.snap b/.forge-snapshots/ModularAccount_Runtime_UseSessionKey_Case1_Counter.snap index f65fc52a4..adb20c9bc 100644 --- a/.forge-snapshots/ModularAccount_Runtime_UseSessionKey_Case1_Counter.snap +++ b/.forge-snapshots/ModularAccount_Runtime_UseSessionKey_Case1_Counter.snap @@ -1 +1 @@ -81252 +80348 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_Runtime_UseSessionKey_Case1_Token.snap b/.forge-snapshots/ModularAccount_Runtime_UseSessionKey_Case1_Token.snap index 7f8cfd0e5..f8fdea61f 100644 --- a/.forge-snapshots/ModularAccount_Runtime_UseSessionKey_Case1_Token.snap +++ b/.forge-snapshots/ModularAccount_Runtime_UseSessionKey_Case1_Token.snap @@ -1 +1 @@ -114829 +113925 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_UserOp_Erc20Transfer.snap b/.forge-snapshots/ModularAccount_UserOp_Erc20Transfer.snap index 6addbb57d..b4e942f9a 100644 --- a/.forge-snapshots/ModularAccount_UserOp_Erc20Transfer.snap +++ b/.forge-snapshots/ModularAccount_UserOp_Erc20Transfer.snap @@ -1 +1 @@ -186885 +186599 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_UserOp_InstallSessionKey_Case1.snap b/.forge-snapshots/ModularAccount_UserOp_InstallSessionKey_Case1.snap index 39274dad1..5a3723270 100644 --- a/.forge-snapshots/ModularAccount_UserOp_InstallSessionKey_Case1.snap +++ b/.forge-snapshots/ModularAccount_UserOp_InstallSessionKey_Case1.snap @@ -1 +1 @@ -532728 +532388 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_UserOp_NativeTransfer.snap b/.forge-snapshots/ModularAccount_UserOp_NativeTransfer.snap index 22e9794fb..7c0dcb0ed 100644 --- a/.forge-snapshots/ModularAccount_UserOp_NativeTransfer.snap +++ b/.forge-snapshots/ModularAccount_UserOp_NativeTransfer.snap @@ -1 +1 @@ -163050 +162764 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_UserOp_UseSessionKey_Case1_Counter.snap b/.forge-snapshots/ModularAccount_UserOp_UseSessionKey_Case1_Counter.snap index a172f8985..c35ee1864 100644 --- a/.forge-snapshots/ModularAccount_UserOp_UseSessionKey_Case1_Counter.snap +++ b/.forge-snapshots/ModularAccount_UserOp_UseSessionKey_Case1_Counter.snap @@ -1 +1 @@ -197394 +196494 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_UserOp_UseSessionKey_Case1_Token.snap b/.forge-snapshots/ModularAccount_UserOp_UseSessionKey_Case1_Token.snap index 946ca0d7f..2d9beb063 100644 --- a/.forge-snapshots/ModularAccount_UserOp_UseSessionKey_Case1_Token.snap +++ b/.forge-snapshots/ModularAccount_UserOp_UseSessionKey_Case1_Token.snap @@ -1 +1 @@ -228536 +227637 \ No newline at end of file diff --git a/.forge-snapshots/ModularAccount_UserOp_deferredValidation.snap b/.forge-snapshots/ModularAccount_UserOp_deferredValidation.snap index 76549d091..04f653186 100644 --- a/.forge-snapshots/ModularAccount_UserOp_deferredValidation.snap +++ b/.forge-snapshots/ModularAccount_UserOp_deferredValidation.snap @@ -1 +1 @@ -261579 +261013 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_Runtime_Erc20Transfer.snap b/.forge-snapshots/SemiModularAccount_Runtime_Erc20Transfer.snap index 368eb902a..028e12038 100644 --- a/.forge-snapshots/SemiModularAccount_Runtime_Erc20Transfer.snap +++ b/.forge-snapshots/SemiModularAccount_Runtime_Erc20Transfer.snap @@ -1 +1 @@ -76246 +75683 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_Runtime_InstallSessionKey_Case1.snap b/.forge-snapshots/SemiModularAccount_Runtime_InstallSessionKey_Case1.snap index 02780ea53..a2bf4881b 100644 --- a/.forge-snapshots/SemiModularAccount_Runtime_InstallSessionKey_Case1.snap +++ b/.forge-snapshots/SemiModularAccount_Runtime_InstallSessionKey_Case1.snap @@ -1 +1 @@ -423396 +422836 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_Runtime_NativeTransfer.snap b/.forge-snapshots/SemiModularAccount_Runtime_NativeTransfer.snap index a85a52da2..e275c700c 100644 --- a/.forge-snapshots/SemiModularAccount_Runtime_NativeTransfer.snap +++ b/.forge-snapshots/SemiModularAccount_Runtime_NativeTransfer.snap @@ -1 +1 @@ -52368 +51805 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_Runtime_UseSessionKey_Case1_Counter.snap b/.forge-snapshots/SemiModularAccount_Runtime_UseSessionKey_Case1_Counter.snap index e8d507a7b..e4a20a86d 100644 --- a/.forge-snapshots/SemiModularAccount_Runtime_UseSessionKey_Case1_Counter.snap +++ b/.forge-snapshots/SemiModularAccount_Runtime_UseSessionKey_Case1_Counter.snap @@ -1 +1 @@ -81624 +80720 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_Runtime_UseSessionKey_Case1_Token.snap b/.forge-snapshots/SemiModularAccount_Runtime_UseSessionKey_Case1_Token.snap index 381d10234..eec81ab64 100644 --- a/.forge-snapshots/SemiModularAccount_Runtime_UseSessionKey_Case1_Token.snap +++ b/.forge-snapshots/SemiModularAccount_Runtime_UseSessionKey_Case1_Token.snap @@ -1 +1 @@ -115201 +114297 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_UserOp_Erc20Transfer.snap b/.forge-snapshots/SemiModularAccount_UserOp_Erc20Transfer.snap index 7213f07d7..c19fae4f6 100644 --- a/.forge-snapshots/SemiModularAccount_UserOp_Erc20Transfer.snap +++ b/.forge-snapshots/SemiModularAccount_UserOp_Erc20Transfer.snap @@ -1 +1 @@ -182144 +181858 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_UserOp_InstallSessionKey_Case1.snap b/.forge-snapshots/SemiModularAccount_UserOp_InstallSessionKey_Case1.snap index 1846ca7af..3d24885e9 100644 --- a/.forge-snapshots/SemiModularAccount_UserOp_InstallSessionKey_Case1.snap +++ b/.forge-snapshots/SemiModularAccount_UserOp_InstallSessionKey_Case1.snap @@ -1 +1 @@ -530208 +529925 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_UserOp_NativeTransfer.snap b/.forge-snapshots/SemiModularAccount_UserOp_NativeTransfer.snap index 6caaea94e..87248cf4e 100644 --- a/.forge-snapshots/SemiModularAccount_UserOp_NativeTransfer.snap +++ b/.forge-snapshots/SemiModularAccount_UserOp_NativeTransfer.snap @@ -1 +1 @@ -158303 +158017 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_UserOp_UseSessionKey_Case1_Counter.snap b/.forge-snapshots/SemiModularAccount_UserOp_UseSessionKey_Case1_Counter.snap index e5fb37340..f25fe8804 100644 --- a/.forge-snapshots/SemiModularAccount_UserOp_UseSessionKey_Case1_Counter.snap +++ b/.forge-snapshots/SemiModularAccount_UserOp_UseSessionKey_Case1_Counter.snap @@ -1 +1 @@ -197569 +196669 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_UserOp_UseSessionKey_Case1_Token.snap b/.forge-snapshots/SemiModularAccount_UserOp_UseSessionKey_Case1_Token.snap index d5871dc3a..f1a243d3a 100644 --- a/.forge-snapshots/SemiModularAccount_UserOp_UseSessionKey_Case1_Token.snap +++ b/.forge-snapshots/SemiModularAccount_UserOp_UseSessionKey_Case1_Token.snap @@ -1 +1 @@ -228723 +227824 \ No newline at end of file diff --git a/.forge-snapshots/SemiModularAccount_UserOp_deferredValidation.snap b/.forge-snapshots/SemiModularAccount_UserOp_deferredValidation.snap index 03eb7bc3c..9810eb970 100644 --- a/.forge-snapshots/SemiModularAccount_UserOp_deferredValidation.snap +++ b/.forge-snapshots/SemiModularAccount_UserOp_deferredValidation.snap @@ -1 +1 @@ -258011 +257442 \ No newline at end of file diff --git a/test/account/ExecutionInstallDelegate.t.sol b/test/account/ExecutionInstallDelegate.t.sol new file mode 100644 index 000000000..328e73bfa --- /dev/null +++ b/test/account/ExecutionInstallDelegate.t.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.26; + +import {ExecutionInstallDelegate} from "../../src/helpers/ExecutionInstallDelegate.sol"; +import {AccountTestBase} from "../utils/AccountTestBase.sol"; +import {ExecutionManifest} from "@erc6900/reference-implementation/interfaces/IExecutionModule.sol"; + +contract ExecutionInstallDelegateTest is AccountTestBase { + function test_fail_directCall_delegateCallOnly() public { + ExecutionInstallDelegate delegate = new ExecutionInstallDelegate(); + ExecutionManifest memory emptyManifest; + + vm.expectRevert(ExecutionInstallDelegate.OnlyDelegateCall.selector); + delegate.installExecution({module: address(0), manifest: emptyManifest, moduleInstallData: ""}); + } +}