Skip to content

Commit 180ab79

Browse files
committed
feat: update interfaces to be consistent
1 parent 2d3784c commit 180ab79

File tree

2 files changed

+18
-30
lines changed

2 files changed

+18
-30
lines changed

src/interfaces/IModularAccount.sol

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ interface IModularAccount {
7878
/// @notice Install a module to the modular account.
7979
/// @param module The module to install.
8080
/// @param manifest the manifest describing functions to install
81-
/// @param moduleInstallData Optional data to be decoded and used by the module to setup initial module data
82-
/// for the modular account.
81+
/// @param moduleInstallData Optional data to be used by the account to handle the initial execution setup,
82+
/// data encoding is implementation-specific.
8383
function installExecution(
8484
address module,
8585
ExecutionManifest calldata manifest,
@@ -91,10 +91,10 @@ interface IModularAccount {
9191
/// @dev This does not validate anything against the manifest - the caller must ensure validity.
9292
/// @param validationConfig The validation function to install, along with configuration flags.
9393
/// @param selectors The selectors to install the validation function for.
94-
/// @param installData Optional data to be decoded and used by the module to setup initial module state.
95-
/// @param hooks Optional hooks to install, associated with the validation function. These may be
96-
/// pre validation hooks or execution hooks. The expected format is a bytes25 HookConfig, followed by the
97-
/// install data, if any.
94+
/// @param installData Optional data to be used by the account to handle the initial validation setup, data
95+
/// encoding is implementation-specific.
96+
/// @param hooks Optional hooks to install and associate with the validation function, data encoding is
97+
/// implementation-specific.
9898
function installValidation(
9999
ValidationConfig validationConfig,
100100
bytes4[] calldata selectors,
@@ -104,11 +104,10 @@ interface IModularAccount {
104104

105105
/// @notice Uninstall a validation function from a set of execution selectors.
106106
/// @param validationFunction The validation function to uninstall.
107-
/// @param uninstallData Optional data to be decoded and used by the module to clear module data for the
108-
/// account.
109-
/// @param hookUninstallData Optional data to be used by hooks for cleanup. If any are provided, the array must
110-
/// be of a length equal to existing pre validation hooks plus execution hooks. Hooks are indexed by
111-
/// pre validation hook order first, then execution hooks.
107+
/// @param uninstallData Optional data to be used by the account to handle the validation uninstallation, data
108+
/// encoding is implementation-specific.
109+
/// @param hookUninstallData Optional data to be used by the account to handle hook uninstallation, data
110+
/// encoding is implementation-specific.
112111
function uninstallValidation(
113112
ModuleEntity validationFunction,
114113
bytes calldata uninstallData,
@@ -118,8 +117,8 @@ interface IModularAccount {
118117
/// @notice Uninstall a module from the modular account.
119118
/// @param module The module to uninstall.
120119
/// @param manifest the manifest describing functions to uninstall.
121-
/// @param moduleUninstallData Optional data to be decoded and used by the module to clear module data for the
122-
/// modular account.
120+
/// @param moduleUninstallData Optional data to be used by the account to handle the execution uninstallation,
121+
/// data encoding is implementation-specific.
123122
function uninstallExecution(
124123
address module,
125124
ExecutionManifest calldata manifest,

standard/ERCs/erc-6900.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ interface IModularAccount {
215215
/// @return The account ID.
216216
function accountId() external view returns (string memory);
217217
}
218-
219218
```
220219

221220
#### `IModularAccountView.sol`
@@ -275,17 +274,6 @@ interface IModularAccountView {
275274
Module interface. Modules **MUST** implement this interface to support module management and interactions with ERC-6900 modular accounts.
276275

277276
```solidity
278-
/// @dev A struct holding fields to describe the module in a purely view context. Intended for front end clients.
279-
struct ModuleMetadata {
280-
// A human-readable name of the module.
281-
string name;
282-
// The version of the module, following the semantic versioning scheme.
283-
string version;
284-
// The author field SHOULD be a username representing the identity of the user or organization
285-
// that created this module.
286-
string author;
287-
}
288-
289277
interface IModule is IERC165 {
290278
/// @notice Initialize module data for the modular account.
291279
/// @dev Called by the modular account during `installExecution`.
@@ -299,10 +287,11 @@ interface IModule is IERC165 {
299287
/// account.
300288
function onUninstall(bytes calldata data) external;
301289
302-
/// @notice Describe the metadata of the module.
303-
/// @dev This metadata MUST stay constant over time.
304-
/// @return A metadata struct describing the module.
305-
function moduleMetadata() external pure returns (ModuleMetadata memory);
290+
/// @notice Return a unique identifier for the module.
291+
/// @dev This function MUST return a string in the format "vendor.module.semver". The vendor and module
292+
/// names MUST NOT contain a period character.
293+
/// @return The module ID.
294+
function moduleId() external view returns (string memory);
306295
}
307296
```
308297

@@ -412,7 +401,7 @@ Execution module interface. Modules **MAY** implement this interface to provide
412401
struct ManifestExecutionFunction {
413402
// The selector to install
414403
bytes4 executionSelector;
415-
// Whether or not the function needs runtime validation, or can be called by anyone.
404+
// If true, the function won't need runtime validation, and can be called by anyone.
416405
bool skipRuntimeValidation;
417406
// If true, the function can be validated by a global validation function.
418407
bool allowGlobalValidation;

0 commit comments

Comments
 (0)