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
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,7 +154,7 @@ interface IModularAccount {
154
154
/// @param data The calldata to send to the account.
155
155
/// @param authorization The authorization data to use for the call. The first 24 bytes specifies which runtime
156
156
/// validation to use, and the rest is sent as a parameter to runtime validation.
157
-
function executeWithAuthorization(bytes calldata data, bytes calldata authorization)
157
+
function executeWithRuntimeValidation(bytes calldata data, bytes calldata authorization)
158
158
external
159
159
payable
160
160
returns (bytes memory);
@@ -372,6 +372,7 @@ interface IValidationHookModule is IModule {
372
372
/// @param sender The caller address.
373
373
/// @param value The call value.
374
374
/// @param data The calldata sent.
375
+
/// @param authorization Additional data for the hook to use.
375
376
function preRuntimeValidationHook(
376
377
uint32 entityId,
377
378
address sender,
@@ -517,18 +518,19 @@ During execution uninstallation, the account MUST correctly clear flags and othe
517
518
#### Execution Hooks Data Format
518
519
519
520
For accounts that implement execution hooks, accounts MUST conform to these execution hook formats:
521
+
520
522
1. For `executeUserOp` calls, for execution hooks associated with a validation function, accounts MUST send the full `msg.data`, including the `executeUserOp` selector.
521
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`.
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
+
3. For `executeWithRuntimeValidation` 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`.
524
526
525
527
#### Hook Execution Order
526
528
527
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.
528
530
529
531
### Validation Call Flow
530
532
531
-
Modular accounts support three different calls flows for validation: user op validation, runtime validation, and signature validation. User op validation happens within the account's implementation of the function `validateUserOp`, defined in the ERC-4337 interface `IAccount`. Runtime validation happens through the dispatcher function `executeWithAuthorization`, or when using direct call validation. Signature validation happens within the account's implementation of the function `isValidSignature`, defined in ERC-1271.
533
+
Modular accounts support three different calls flows for validation: user op validation, runtime validation, and signature validation. User op validation happens within the account's implementation of the function `validateUserOp`, defined in the ERC-4337 interface `IAccount`. Runtime validation happens through the dispatcher function `executeWithRuntimeValidation`, or when using direct call validation. Signature validation happens within the account's implementation of the function `isValidSignature`, defined in ERC-1271.
532
534
533
535
For each of these validation types, an account implementation MAY specify its own format for selecting which validation function to use, as well as any per-hook data for validation hooks.
534
536
@@ -552,13 +554,13 @@ Installed validations have two flag variables indicating what they may be used f
552
554
553
555
#### Direct Call Validation
554
556
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.
557
+
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 `executeWithRuntimeValidation` to use as a selection mechanism for a runtime validation function.
556
558
557
559
To implement direct call validation, the modular account MUST treat direct function calls that are not from the modular account itself or the EntryPoint as an attempt to validate using the caller's address and the entity ID of `0xffffffff`. If such a validation function is installed, and applies to the function intended to be called, the modular account MUST allow it to continue, without performing runtime validation. Any pre validation hooks and execution hooks installed to this validation function MUST still run.
558
560
559
561
### Execution Call Flow
560
562
561
-
For all non-view functions within `IModularAccount` except `executeWithAuthorization`, all module-defined execution functions, and any additional native functions that the modular account MAY wish to include, the modular account MUST adhere to these steps during execution:
563
+
For all non-view functions within `IModularAccount` except `executeWithRuntimeValidation`, all module-defined execution functions, and any additional native functions that the modular account MAY wish to include, the modular account MUST adhere to these steps during execution:
562
564
563
565
If the caller is not the EntryPoint or the account, the account MUST check access control for direct call validation.
0 commit comments