diff --git a/standard/ERCs/erc-6900.md b/standard/ERCs/erc-6900.md index 1ac13b73..0cd1f025 100644 --- a/standard/ERCs/erc-6900.md +++ b/standard/ERCs/erc-6900.md @@ -480,15 +480,15 @@ interface IExecutionHookModule is IModule { } ``` -### Expected behavior - -#### Validations and their installation /uninstallation +### Validations and Their Installation/Uninstallation An account can have more than one validation module/function installed. An account can have the same validation module installed more than once. The entityId of a validation function installed on an account MUST be unique. Validation installation MAY be deferred until a later time, such as upon first use. +#### Installation + During validation installation, the account MUST correctly set flags and other fields based on the incoming data provided by the user. - the account MUST install all pre validation hooks required by the user and SHOULD call `onInstall` with the user-provided data on the hook module to initialize the states if required by user. @@ -498,6 +498,8 @@ During validation installation, the account MUST correctly set flags and other f - the account SHOULD call `onInstall` on the validation module to initialize the states if required by user. - the account MUST emit `ValidationInstalled` as defined in the interface for all installed validations. +#### Uninstallation + During validation uninstallation, the account MUST correctly clear flags and other fields based on the incoming data provided by the user. - the account MUST clear all flags for the validation function, like `isGlobal`, `isSignatureValidation`, and `isUserOpValidation`. @@ -505,12 +507,14 @@ During validation uninstallation, the account MUST correctly clear flags and oth - the account MUST remove all selectors that the validation function can validate. - the account MUST emit `ValidationUninstalled` as defined in the interface for all uninstalled validations. -#### Execution and their installation /uninstallation +### Execution and Their Installation/Uninstallation An account can install any number of execution functions. An execution function selector MUST be unique in the account. An execution function selector MUST not conflict with native ERC-4337 and ERC-6900 functions. +#### Installation + During execution installation, the account MUST correctly set flags and other fields based on the incoming data and module manifest provided by the user. - the account MUST install all execution functions and set flags and fields as specified in the manifest. @@ -519,6 +523,8 @@ During execution installation, the account MUST correctly set flags and other fi - the account SHOULD call `onInstall` on the execution module to initialize the states if required by user. - the account MUST emit `ExecutionInstalled` as defined in the interface for all installed executions. +#### Uninstallation + During execution uninstallation, the account MUST correctly clear flags and other fields based on the incoming data and module manifest provided by the user. - the account MUST remove all execution functions and clear flags and fields as specified in the manifest. @@ -527,7 +533,7 @@ 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 +### 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.