Skip to content

fix: update interfaces to be consistent #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions src/interfaces/IModularAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ interface IModularAccount {
/// @notice Install a module to the modular account.
/// @param module The module to install.
/// @param manifest the manifest describing functions to install
/// @param moduleInstallData Optional data to be decoded and used by the module to setup initial module data
/// for the modular account.
/// @param moduleInstallData Optional data to be used by the account to handle the initial execution setup,
/// data encoding is implementation-specific.
function installExecution(
address module,
ExecutionManifest calldata manifest,
Expand All @@ -91,10 +91,10 @@ interface IModularAccount {
/// @dev This does not validate anything against the manifest - the caller must ensure validity.
/// @param validationConfig The validation function to install, along with configuration flags.
/// @param selectors The selectors to install the validation function for.
/// @param installData Optional data to be decoded and used by the module to setup initial module state.
/// @param hooks Optional hooks to install, associated with the validation function. These may be
/// pre validation hooks or execution hooks. The expected format is a bytes25 HookConfig, followed by the
/// install data, if any.
/// @param installData Optional data to be used by the account to handle the initial validation setup, data
/// encoding is implementation-specific.
/// @param hooks Optional hooks to install and associate with the validation function, data encoding is
/// implementation-specific.
function installValidation(
ValidationConfig validationConfig,
bytes4[] calldata selectors,
Expand All @@ -104,11 +104,10 @@ interface IModularAccount {

/// @notice Uninstall a validation function from a set of execution selectors.
/// @param validationFunction The validation function to uninstall.
/// @param uninstallData Optional data to be decoded and used by the module to clear module data for the
/// account.
/// @param hookUninstallData Optional data to be used by hooks for cleanup. If any are provided, the array must
/// be of a length equal to existing pre validation hooks plus execution hooks. Hooks are indexed by
/// pre validation hook order first, then execution hooks.
/// @param uninstallData Optional data to be used by the account to handle the validation uninstallation, data
/// encoding is implementation-specific.
/// @param hookUninstallData Optional data to be used by the account to handle hook uninstallation, data
/// encoding is implementation-specific.
function uninstallValidation(
ModuleEntity validationFunction,
bytes calldata uninstallData,
Expand All @@ -118,8 +117,8 @@ interface IModularAccount {
/// @notice Uninstall a module from the modular account.
/// @param module The module to uninstall.
/// @param manifest the manifest describing functions to uninstall.
/// @param moduleUninstallData Optional data to be decoded and used by the module to clear module data for the
/// modular account.
/// @param moduleUninstallData Optional data to be used by the account to handle the execution uninstallation,
/// data encoding is implementation-specific.
function uninstallExecution(
address module,
ExecutionManifest calldata manifest,
Expand Down
23 changes: 6 additions & 17 deletions standard/ERCs/erc-6900.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ interface IModularAccount {
/// @return The account ID.
function accountId() external view returns (string memory);
}

```

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

```solidity
/// @dev A struct holding fields to describe the module in a purely view context. Intended for front end clients.
struct ModuleMetadata {
// A human-readable name of the module.
string name;
// The version of the module, following the semantic versioning scheme.
string version;
// The author field SHOULD be a username representing the identity of the user or organization
// that created this module.
string author;
}

interface IModule is IERC165 {
/// @notice Initialize module data for the modular account.
/// @dev Called by the modular account during `installExecution`.
Expand All @@ -299,10 +287,11 @@ interface IModule is IERC165 {
/// account.
function onUninstall(bytes calldata data) external;

/// @notice Describe the metadata of the module.
/// @dev This metadata MUST stay constant over time.
/// @return A metadata struct describing the module.
function moduleMetadata() external pure returns (ModuleMetadata memory);
/// @notice Return a unique identifier for the module.
/// @dev This function MUST return a string in the format "vendor.module.semver". The vendor and module
/// names MUST NOT contain a period character.
/// @return The module ID.
function moduleId() external view returns (string memory);
}
```

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