|
1 | 1 | --- |
2 | 2 | eip: 6900 |
3 | 3 | title: Modular Smart Contract Accounts and Plugins |
4 | | -description: Interfaces for composable contract accounts optionally supporting upgradeability and introspection |
| 4 | +description: Interfaces for composable contract accounts optionally supporting upgradability and introspection |
5 | 5 | author: Adam Egyed (@adamegyed), Fangting Liu (@trinity-0111), Jay Paik (@jaypaik), Yoav Weiss (@yoavw) |
6 | 6 | discussions-to: https://ethereum-magicians.org/t/eip-modular-smart-contract-accounts-and-plugins/13885 |
7 | 7 | status: Draft |
@@ -435,7 +435,7 @@ struct PluginManifest { |
435 | 435 |
|
436 | 436 | #### Responsibilties of `StandardExecutor` and `PluginExecutor` |
437 | 437 |
|
438 | | -`StandardExecutor` functions are mainly used for open-ended execution against external addresses. |
| 438 | +`StandardExecutor` functions are mainly used for open-ended calls to external addresses. |
439 | 439 |
|
440 | 440 | `PluginExecutor` functions are specifically used by plugins to request the account to execute with account's context. Explicit permissions are required for plugins to use `PluginExecutor`. |
441 | 441 |
|
@@ -516,10 +516,10 @@ Additionally, when the modular account natively implements functions in `IPlugin |
516 | 516 |
|
517 | 517 | The steps to perform are: |
518 | 518 |
|
519 | | -- If the call is not from the `EntryPoint`, then find an associated runtime validation function. If one does not exist, execution MUST revert. The modular account MUST execute all pre runtime validation hooks, then the runtime validation function, with the `call` opcode. All of these functions MUST receive the caller, value, and execution function's calldata as parameters. If any of these functions revert, execution MUST revert. If any pre runtime validation hooks are set to `PRE_HOOK_ALWAYS_DENY`, execution MUST revert. If any runtime validation functions are set to `RUNTIME_VALIDATION_ALWAYS_ALLOW`, the validation function MUST be bypassed. |
520 | | -- If there are pre execution hooks defined for the execution function, execute those hooks with the caller, value, and execution function's calldata as parameters. If any of these hooks returns data, it MUST be preserved until the call to the post execution hook. The operation MUST be done with the `call` opcode. If there are duplicate pre execution hooks applied to the same selector, run the hook only once. If any of these functions revert, execution MUST revert. |
| 519 | +- If the call is not from the `EntryPoint`, then find an associated runtime validation function. If one does not exist, execution MUST revert. The modular account MUST execute all pre runtime validation hooks, then the runtime validation function, with the `call` opcode. All of these functions MUST receive the caller, value, and execution function's calldata as parameters. If any of these functions revert, execution MUST revert. If any pre runtime validation hooks are set to `PRE_HOOK_ALWAYS_DENY`, execution MUST revert. If the runtime validation function is set to `RUNTIME_VALIDATION_ALWAYS_ALLOW`, the validation function MUST be bypassed. |
| 520 | +- If there are pre execution hooks defined for the execution function, execute those hooks with the caller, value, and execution function's calldata as parameters. If any of these hooks returns data, it MUST be preserved until the call to the post execution hook. The operation MUST be done with the `call` opcode. If there is more than one instance of the same pre execution hook (i.e., the hooks have the same function ID and are from the same plugin) applied to the same selector, run the hook only once. If any of these functions revert, execution MUST revert. |
521 | 521 | - Run the execution function. |
522 | | -- If any post execution hooks are defined, run the functions. If a pre execution hook returned data to the account, that data MUST be passed as a parameter to the associated post execution hook. The operation MUST be done with the `call` opcode. If there are duplicate post execution hooks applied to the same selector, run them once for each unique associated pre execution hook. For post execution hooks without an associated pre execution hook, run the hook only once. If any of these functions revert, execution MUST revert. Notably, for the `uninstallPlugin` native function, the post execution hooks defined for it prior to the uninstall MUST run afterwards. |
| 522 | +- If any post execution hooks are defined, run the functions. If a pre execution hook returned data to the account, that data MUST be passed as a parameter to the associated post execution hook. The operation MUST be done with the `call` opcode. If there is more than one instance of the same post execution hook applied to the same selector, run them once for each unique associated pre execution hook. For post execution hooks without an associated pre execution hook, run the hook only once. If any of these functions revert, execution MUST revert. Notably, for the `uninstallPlugin` native function, the post execution hooks defined for it prior to the uninstall MUST run afterwards. |
523 | 523 |
|
524 | 524 | #### Calls made from plugins |
525 | 525 |
|
|
0 commit comments