-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [S7] don't return exec hooks in getExecutionData for native func…
…tions that don't execute msg.sig-based hooks (#300) Address potential inconsistencies in `ModularAccountView.getExecutionData` if a module with execution hooks on native functions that DO NOT use the `wrapNativeFunction` modifier is installed. Native functions without `wrapNativeFunction` do not run `msg.sig`-based execution hooks. Since we allow installations of modules that clash with native function selectors, it is probably best to give a consistent view of what will actually be executed via our ModularAccountView functions. This PR also includes some refactoring to simplify things, as well as addresses some other consistency issues. 1. Adds `initializeWithValidation` to the native function checks for `ModularAccount`. 1. Adds `initialize` to the native function checks for `SemiModularAccountStorageOnly`. 1. Adds `entryPoint()` as a native function check. 1. Update comment on `wrapNativeFunction` to include all native functions that have the modifier applied within `ModularAccountBase`. 1. Removes unnecessary overriding of `_globalValidationAllowed` within `SemiModularAccountBase`. `_isGlobalValidationAllowedNativeFunction` which is overridden there handles it. 1. Updated `_isGlobalValidationAllowedNativeFunction` to take uint32 instead of bytes4 for consistency and codesize.
- Loading branch information
Showing
9 changed files
with
246 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
{ | ||
"Runtime_AccountCreation": "176354", | ||
"Runtime_BatchTransfers": "92886", | ||
"Runtime_Erc20Transfer": "78318", | ||
"Runtime_InstallSessionKey_Case1": "429789", | ||
"Runtime_NativeTransfer": "54467", | ||
"Runtime_BatchTransfers": "92908", | ||
"Runtime_Erc20Transfer": "78340", | ||
"Runtime_InstallSessionKey_Case1": "429733", | ||
"Runtime_NativeTransfer": "54489", | ||
"Runtime_UseSessionKey_Case1_Counter": "78531", | ||
"Runtime_UseSessionKey_Case1_Token": "111844", | ||
"UserOp_BatchTransfers": "197706", | ||
"UserOp_Erc20Transfer": "184680", | ||
"UserOp_InstallSessionKey_Case1": "537469", | ||
"UserOp_NativeTransfer": "160925", | ||
"UserOp_BatchTransfers": "197728", | ||
"UserOp_Erc20Transfer": "184702", | ||
"UserOp_InstallSessionKey_Case1": "537413", | ||
"UserOp_NativeTransfer": "160947", | ||
"UserOp_UseSessionKey_Case1_Counter": "194415", | ||
"UserOp_UseSessionKey_Case1_Token": "225399", | ||
"UserOp_deferredValidation": "233002" | ||
"UserOp_deferredValidation": "232968" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
{ | ||
"Runtime_AccountCreation": "97767", | ||
"Runtime_BatchTransfers": "88758", | ||
"Runtime_Erc20Transfer": "74238", | ||
"Runtime_InstallSessionKey_Case1": "427940", | ||
"Runtime_NativeTransfer": "50397", | ||
"Runtime_BatchTransfers": "88735", | ||
"Runtime_Erc20Transfer": "74215", | ||
"Runtime_InstallSessionKey_Case1": "427839", | ||
"Runtime_NativeTransfer": "50374", | ||
"Runtime_UseSessionKey_Case1_Counter": "78834", | ||
"Runtime_UseSessionKey_Case1_Token": "112147", | ||
"UserOp_BatchTransfers": "192875", | ||
"UserOp_Erc20Transfer": "179932", | ||
"UserOp_InstallSessionKey_Case1": "534742", | ||
"UserOp_NativeTransfer": "156207", | ||
"UserOp_BatchTransfers": "192852", | ||
"UserOp_Erc20Transfer": "179909", | ||
"UserOp_InstallSessionKey_Case1": "534641", | ||
"UserOp_NativeTransfer": "156184", | ||
"UserOp_UseSessionKey_Case1_Counter": "194667", | ||
"UserOp_UseSessionKey_Case1_Token": "225651", | ||
"UserOp_deferredValidation": "228953" | ||
"UserOp_deferredValidation": "228829" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.