@@ -7,28 +7,28 @@ import {UserOperation} from "@eth-infinitism/account-abstraction/interfaces/User
77// so annotating here to prevent that.
88// forgefmt: disable-start
99enum ManifestAssociatedFunctionType {
10- /// @notice Function is not defined.
10+ // Function is not defined.
1111 NONE,
12- /// @notice Function belongs to this plugin.
12+ // Function belongs to this plugin.
1313 SELF,
14- /// @notice Function belongs to an external plugin provided as a dependency during plugin installation.
14+ // Function belongs to an external plugin provided as a dependency during plugin installation.
1515 DEPENDENCY,
16- /// @notice Resolves to a magic value to always bypass runtime validation for a given function.
17- /// This is only assignable on runtime validation functions. If it were to be used on a user op validationFunction ,
18- /// it would risk burning gas from the account. When used as a hook in any hook location, it is equivalent to not
19- /// setting a hook and is therefore disallowed.
16+ // Resolves to a magic value to always bypass runtime validation for a given function.
17+ // This is only assignable on runtime validation functions. If it were to be used on a user op validation function ,
18+ // it would risk burning gas from the account. When used as a hook in any hook location, it is equivalent to not
19+ // setting a hook and is therefore disallowed.
2020 RUNTIME_VALIDATION_ALWAYS_ALLOW,
21- /// @notice Resolves to a magic value to always fail in a hook for a given function.
22- /// This is only assignable to pre hooks (pre validation and pre execution). It should not be used on
23- /// validation functions themselves, because this is equivalent to leaving the validation functions unset.
24- /// It should not be used in post-exec hooks, because if it is known to always revert, that should happen
25- /// as early as possible to save gas.
21+ // Resolves to a magic value to always fail in a hook for a given function.
22+ // This is only assignable to pre hooks (pre validation and pre execution). It should not be used on
23+ // validation functions themselves, because this is equivalent to leaving the validation functions unset.
24+ // It should not be used in post-exec hooks, because if it is known to always revert, that should happen
25+ // as early as possible to save gas.
2626 PRE_HOOK_ALWAYS_DENY
2727}
2828// forgefmt: disable-end
2929
30- // For functions of type `ManifestAssociatedFunctionType.DEPENDENCY`, the MSCA MUST find the plugin address
31- // of the function at `dependencies[dependencyIndex]` during the call to `installPlugin(config)`.
30+ /// @dev For functions of type `ManifestAssociatedFunctionType.DEPENDENCY`, the MSCA MUST find the plugin address
31+ /// of the function at `dependencies[dependencyIndex]` during the call to `installPlugin(config)`.
3232struct ManifestFunction {
3333 ManifestAssociatedFunctionType functionType;
3434 uint8 functionId;
@@ -73,19 +73,21 @@ struct PluginMetadata {
7373
7474/// @dev A struct describing how the plugin should be installed on a modular account.
7575struct PluginManifest {
76- // List of ERC-165 interfaceIds to add to account to support introspection checks.
76+ // List of ERC-165 interface IDs to add to account to support introspection checks. This MUST NOT include
77+ // IPlugin's interface ID.
7778 bytes4 [] interfaceIds;
78- // If this plugin depends on other plugins' validation functions and/or hooks , the interface IDs of
79- // those plugins MUST be provided here, with its position in the array matching the `dependencyIndex`
80- // members of `ManifestFunction` structs used in the manifest.
79+ // If this plugin depends on other plugins' validation functions, the interface IDs of those plugins MUST be
80+ // provided here, with its position in the array matching the `dependencyIndex` members of `ManifestFunction `
81+ // structs used in the manifest.
8182 bytes4 [] dependencyInterfaceIds;
8283 // Execution functions defined in this plugin to be installed on the MSCA.
8384 bytes4 [] executionFunctions;
8485 // Plugin execution functions already installed on the MSCA that this plugin will be able to call.
8586 bytes4 [] permittedExecutionSelectors;
86- // Boolean to indicate whether the plugin can call any external contract addresses .
87+ // Boolean to indicate whether the plugin can call any external address .
8788 bool permitAnyExternalAddress;
88- // Boolean to indicate whether the plugin needs access to spend native tokens of the account.
89+ // Boolean to indicate whether the plugin needs access to spend native tokens of the account. If false, the
90+ // plugin MUST still be able to spend up to the balance that it sends to the account in the same call.
8991 bool canSpendNativeToken;
9092 ManifestExternalCallPermission[] permittedExternalCalls;
9193 ManifestAssociatedFunction[] userOpValidationFunctions;
0 commit comments