Skip to content

Commit

Permalink
Update EIP-6900: add missing members to IPlugin structs, correct inst…
Browse files Browse the repository at this point in the history
…all step statement

Merged by EIP-Bot.
  • Loading branch information
jaypaik committed Sep 11, 2023
1 parent 22c0ef2 commit 7c47876
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions EIPS/eip-6900.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ interface IPlugin {
function postExecutionHook(uint8 functionId, bytes calldata preExecHookData) external;
/// @notice Describe the contents and intended configuration of the plugin.
/// @dev This function MUST NOT make any state changes.
/// @dev The manifest MUST stay constant over time.
/// @return A manifest describing the contents and intended configuration of the plugin.
function pluginManifest() external pure returns (PluginManifest memory);
}
Expand Down Expand Up @@ -279,6 +279,7 @@ struct ManifestExecutionHook {
}
struct ManifestStandardExecutionHook {
bytes4 executionSelector;
ManifestFunction validator;
ManifestFunction preExecHook;
ManifestFunction postExecHook;
Expand Down Expand Up @@ -318,6 +319,7 @@ struct PluginManifest {
ManifestPreValidationHook[] preUserOpValidationHooks;
ManifestPreValidationHook[] preRuntimeValidationHooks;
ManifestExecutionHook[] executionHooks;
ManifestExecutionHook[] pluginExecutionHooks;
ManifestStandardExecutionHook[] standardExecutionHooks;
}
```
Expand All @@ -344,7 +346,7 @@ The function MUST store the plugin's permitted execution selectors and external
The function MUST parse through the execution functions, validation functions, and hooks in the manifest and add them to the modular account after resolving each `ManifestFunction` type.

- Each execution selector MUST be added as a valid execution function on the modular account. If the execution selector has already been added or matches the selector of a native function, the function SHOULD revert.
- If an associated function that is to be added already exists, execution SHOULD NOT revert but continue to the next operation.
- If an associated function that is to be added already exists, the function SHOULD revert.

Finally, the function MUST call the plugin's `onInstall` callback with the data provided in the `installData` parameter. This serves to initialize the plugin state for the modular account. If `onInstall` reverts, the `installPlugin` function MUST revert.

Expand Down

0 comments on commit 7c47876

Please sign in to comment.