Skip to content

Commit

Permalink
fix: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaypaik committed Jan 24, 2024
1 parent 2ba4978 commit 9cfac88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/account/UpgradeableModularAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ contract UpgradeableModularAccount is
// EXTERNAL FUNCTIONS

/// @notice Initializes the account with a set of plugins
/// @dev No dependencies or hooks can be injected with this installation
/// @dev No dependencies may be provided with this installation.
/// @param plugins The plugins to install
/// @param manifestHashes The manifest hashes of the plugins to install
/// @param pluginInstallDatas The plugin install datas of the plugins to install
Expand Down
10 changes: 5 additions & 5 deletions standard/ERCs/erc-6900.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
eip: 6900
title: Modular Smart Contract Accounts and Plugins
description: Interfaces for composable contract accounts optionally supporting upgradeability and introspection
description: Interfaces for composable contract accounts optionally supporting upgradability and introspection
author: Adam Egyed (@adamegyed), Fangting Liu (@trinity-0111), Jay Paik (@jaypaik), Yoav Weiss (@yoavw)
discussions-to: https://ethereum-magicians.org/t/eip-modular-smart-contract-accounts-and-plugins/13885
status: Draft
Expand Down Expand Up @@ -435,7 +435,7 @@ struct PluginManifest {

#### Responsibilties of `StandardExecutor` and `PluginExecutor`

`StandardExecutor` functions are mainly used for open-ended execution against external addresses.
`StandardExecutor` functions are mainly used for open-ended calls to external addresses.

`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`.

Expand Down Expand Up @@ -516,10 +516,10 @@ Additionally, when the modular account natively implements functions in `IPlugin

The steps to perform are:

- 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.
- 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.
- 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.
- 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.
- Run the execution function.
- 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.
- 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.

#### Calls made from plugins

Expand Down

0 comments on commit 9cfac88

Please sign in to comment.