Skip to content

Commit

Permalink
Prefix ERC6900 interfaces names to avoid conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Jan 30, 2025
1 parent 04ce6a2 commit c218cda
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions ERCS/erc-6900.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,26 @@ Each step is modular, supporting different implementations, which allows for ope
Modular accounts MUST implement:

- `IAccount.sol` and `IAccountExecute.sol` from [ERC-4337](./eip-4337.md).
- `IModularAccount.sol` to support module management and usage, and account identification.
- `IERC6900ModularAccount.sol` to support module management and usage, and account identification.
- The function `isValidSignature` from [ERC-1271](./eip-1271.md)

Modular accounts MAY implement:

- `IModularAccountView.sol` to support visibility in account states on-chain.
- `IERC6900ModularAccountView.sol` to support visibility in account states on-chain.
- [ERC-165](./eip-165.md) for interfaces installed from modules.

Modules MUST implement:

- `IModule.sol` described below and implement ERC-165 for `IModule`.
- `IERC6900Module.sol` described below and implement ERC-165 for `IERC6900Module`.

Modules MAY implement any of the following module types:

- `IValidationModule` to support validation functions for the account.
- `IValidationHookModule` to support hooks for validation functions.
- `IExecutionModule` to support execution functions and their installations on the account.
- `IExecutionHookModule` to support pre & post execution hooks for execution functions.
- `IERC6900ValidationModule` to support validation functions for the account.
- `IERC6900ValidationHookModule` to support hooks for validation functions.
- `IERC6900ExecutionModule` to support execution functions and their installations on the account.
- `IERC6900ExecutionHookModule` to support pre & post execution hooks for execution functions.

#### `IModularAccount.sol`
#### `IERC6900ModularAccount.sol`

Module execution and management interface. Modular accounts MUST implement this interface to support installing and uninstalling modules, and open-ended execution.

Expand Down Expand Up @@ -131,7 +131,7 @@ struct Call {
bytes data;
}
interface IModularAccount {
interface IERC6900ModularAccount {
event ExecutionInstalled(address indexed module, ExecutionManifest manifest);
event ExecutionUninstalled(address indexed module, bool onUninstallSucceeded, ExecutionManifest manifest);
event ValidationInstalled(address indexed module, uint32 indexed entityId);
Expand Down Expand Up @@ -217,7 +217,7 @@ interface IModularAccount {
}
```

#### `IModularAccountView.sol`
#### `IERC6900ModularAccountView.sol`

Module inspection interface. Modular accounts MAY implement this interface to support visibility in module configuration.

Expand Down Expand Up @@ -253,7 +253,7 @@ struct ValidationDataView {
bytes4[] selectors;
}
interface IModularAccountView {
interface IERC6900ModularAccountView {
/// @notice Get the execution data for a selector.
/// @dev If the selector is a native function, the module address will be the address of the account.
/// @param selector The selector to get the data for.
Expand All @@ -271,12 +271,12 @@ interface IModularAccountView {
}
```

#### `IModule.sol`
#### `IERC6900Module.sol`

Module interface. Modules MUST implement this interface to support module management and interactions with [ERC-6900](./eip-6900.md) modular accounts.

```solidity
interface IModule is IERC165 {
interface IERC6900Module is IERC165 {
/// @notice Initialize module data for the modular account.
/// @dev Called by the modular account during `installExecution`.
/// @param data Optional bytes array to be decoded and used by the module to setup initial module data for the
Expand All @@ -297,12 +297,12 @@ interface IModule is IERC165 {
}
```

#### `IValidationModule.sol`
#### `IERC6900ValidationModule.sol`

Validation module interface. Modules MAY implement this interface to provide validation functions for the account.

```solidity
interface IValidationModule is IModule {
interface IERC6900ValidationModule is IERC6900Module {
/// @notice Run the user operation validation function specified by the `entityId`.
/// @param entityId An identifier that routes the call to different internal implementations, should there
/// be more than one.
Expand Down Expand Up @@ -350,12 +350,12 @@ interface IValidationModule is IModule {
}
```

#### `IValidationHookModule.sol`
#### `IERC6900ValidationHookModule.sol`

Validation hook module interface. Modules MAY implement this interface to provide hooks for validation functions for the account.

```solidity
interface IValidationHookModule is IModule {
interface IERC6900ValidationHookModule is IERC6900Module {
/// @notice Run the pre user operation validation hook specified by the `entityId`.
/// @dev Pre user operation validation hooks MUST NOT return an authorizer value other than 0 or 1.
/// @param entityId An identifier that routes the call to different internal implementations, should there
Expand Down Expand Up @@ -396,7 +396,7 @@ interface IValidationHookModule is IModule {
}
```

#### `IExecutionModule.sol`
#### `IERC6900ExecutionModule.sol`

Execution module interface. Modules MAY implement this interface to provide execution functions for the account.

Expand All @@ -423,24 +423,24 @@ struct ExecutionManifest {
ManifestExecutionFunction[] executionFunctions;
ManifestExecutionHook[] executionHooks;
// List of ERC-165 interface IDs to add to account to support introspection checks. This MUST NOT include
// IModule's interface ID.
// IERC6900Module's interface ID.
bytes4[] interfaceIds;
}
interface IExecutionModule is IModule {
interface IERC6900ExecutionModule is IERC6900Module {
/// @notice Describe the contents and intended configuration of the module.
/// @dev This manifest MUST stay constant over time.
/// @return A manifest describing the contents and intended configuration of the module.
function executionManifest() external pure returns (ExecutionManifest memory);
}
```

#### `IExecutionHookModule.sol`
#### `IERC6900ExecutionHookModule.sol`

Execution hook module interface. Modules MAY implement this interface to provide hooks for execution functions for the account.

```solidity
interface IExecutionHookModule is IModule {
interface IERC6900ExecutionHookModule is IERC6900Module {
/// @notice Run the pre execution hook specified by the `entityId`.
/// @dev To indicate the entire call should revert, the function MUST revert.
/// @param entityId An identifier that routes the call to different internal implementations, should there
Expand Down Expand Up @@ -554,7 +554,7 @@ To implement direct call validation, the modular account MUST treat direct funct

### Execution Call Flow

For all non-view functions within `IModularAccount` except `executeWithRuntimeValidation`, all module-defined execution functions, and any additional native functions that the modular account MAY wish to include, the modular account MUST adhere to these steps during execution:
For all non-view functions within `IERC6900ModularAccount` except `executeWithRuntimeValidation`, all module-defined execution functions, and any additional native functions that the modular account MAY wish to include, the modular account MUST adhere to these steps during execution:

If the caller is not the `EntryPoint` or the account, the account MUST check access control for direct call validation.

Expand Down

0 comments on commit c218cda

Please sign in to comment.