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
+14-2Lines changed: 14 additions & 2 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. For `executeUserOp` calls on the account, hook modules would receive the full msg.data.
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,19 @@ 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
+
It is RECOMMENDED for accounts to support execution hooks associated with a validation function for accounts to apply additional permissions on different validation functions.
520
+
521
+
For accounts that implement execution hooks, accounts **MUST** conform to these execution hook formats:
522
+
1. For `executeUserOp` calls, for execution hooks associated with a validator, accounts **MUST** send the full `msg.data`, including the `executeUserOp` selector.
523
+
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`.
524
+
3. For `executeWithAuthorization` calls, for all execution hooks, accounts **MUST** send the inner `data`.
525
+
4. For all other calls, for execution hooks associated with a selector, accounts **MUST** send over `msg.data`.
526
+
527
+
#### Hook Execution Order
516
528
517
529
It is RECOMMENDED that an account implementer runs hooks in first installed first executed order. However, an account MAY implement a different execution order.
0 commit comments