From 5e85f878a0d1f63abe26fc146cc3dfacd450b66e Mon Sep 17 00:00:00 2001 From: Fangting Liu Date: Fri, 30 Aug 2024 11:51:43 -0700 Subject: [PATCH] fix: add recommended hook execution order --- standard/ERCs/erc-6900.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/standard/ERCs/erc-6900.md b/standard/ERCs/erc-6900.md index 5b49ade1..207cba1f 100644 --- a/standard/ERCs/erc-6900.md +++ b/standard/ERCs/erc-6900.md @@ -528,6 +528,10 @@ During execution uninstallation, the account MUST correctly clear flags and othe - the account SHOULD call `onUnInstall` on the execution module to initialize the states and track call success if required by user. - the account MUST emit `ExecutionUninstalled` as defined in the interface for all uninstalled executions. +#### Hook execution order + +It is RECOMMENDED that an account implementer runs hooks in first installed first executed order. However, an account MAY implement a different execution order. + ### Validation Call Flow 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.