You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: standard/ERCs/erc-6900.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -444,7 +444,7 @@ interface IExecutionHookModule is IModule {
444
444
/// be more than one.
445
445
/// @param sender The caller address.
446
446
/// @param value The call value.
447
-
/// @param data The calldata sent.
447
+
/// @param data The calldata sent. For `executeUserOp` calls, hook modules should receive the full msg.data.
448
448
/// @return Context to pass to a post execution hook, if present. An empty bytes array MAY be returned.
449
449
function preExecutionHook(uint32 entityId, address sender, uint256 value, bytes calldata data)
450
450
external
@@ -512,7 +512,17 @@ During execution uninstallation, the account MUST correctly clear flags and othe
512
512
- the account SHOULD call `onUnInstall` on the execution module to initialize the states and track call success if required by user.
513
513
- the account MUST emit `ExecutionUninstalled` as defined in the interface for all uninstalled executions.
514
514
515
-
### Hook Execution Order
515
+
### Hooks
516
+
517
+
#### Execution Hooks Data Format
518
+
519
+
For accounts that implement execution hooks, accounts MUST conform to these execution hook formats:
520
+
1. For `executeUserOp` calls, for execution hooks associated with a validation function, accounts MUST send the full `msg.data`, including the `executeUserOp` selector.
521
+
2. For `executeUserOp` calls, for execution hooks associated with a selector, accounts MUST send `PackedUserOperation.callData` for `executeUserOp` calls, excluding `executeUserOp.selector` and the rest of the `PackedUserOperation`.
522
+
3. For `executeWithAuthorization` calls, for all execution hooks, accounts MUST send the inner `data`.
523
+
4. For all other calls, for execution hooks associated with a selector, accounts MUST send over `msg.data`.
524
+
525
+
#### Hook Execution Order
516
526
517
527
It is RECOMMENDED that an account implementer runs hooks in first installed first executed order. However, an account MAY implement a different execution order.
518
528
@@ -540,7 +550,7 @@ If the selector being checked is `execute` or `executeBatch`, the modular accoun
540
550
541
551
Installed validations have two flag variables indicating what they may be used for. If a validation is attempted to be used for user op validation and the flag `isUserOpValidation` is set to false, validation MUST revert. If the validation is attempted to be used for signature validation and the flag `isSignatureValidation` is set to false, validation MUST revert.
542
552
543
-
#### Direct Call Validation.
553
+
#### Direct Call Validation
544
554
545
555
If a validation function is installed with the entity ID of `0xffffffff`, it may be used as direct call validation. This occurs when a module or other address calls a function on the modular account, without wrapping its call in the dispatcher function `executeWithAuthorization` to use as a selection mechanism for a runtime validation function.
0 commit comments