Skip to content

Commit c5c3091

Browse files
authored
feat(spec): misc fixes (#171)
1 parent 7774500 commit c5c3091

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

src/interfaces/IExecutionModule.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pragma solidity ^0.8.25;
44
import {IModule} from "./IModule.sol";
55

66
struct ManifestExecutionFunction {
7-
// TODO(erc6900 spec): These fields can be packed into a single word
87
// The selector to install
98
bytes4 executionSelector;
109
// If true, the function won't need runtime validation, and can be called by anyone.
@@ -14,7 +13,6 @@ struct ManifestExecutionFunction {
1413
}
1514

1615
struct ManifestExecutionHook {
17-
// TODO(erc6900 spec): These fields can be packed into a single word
1816
bytes4 executionSelector;
1917
uint32 entityId;
2018
bool isPreHook;

src/modules/validation/SingleSignerValidationModule.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ contract SingleSignerValidationModule is ISingleSignerValidationModule, ReplaySa
5050

5151
/// @inheritdoc IModule
5252
function onUninstall(bytes calldata data) external override {
53-
// ToDo: what does it mean in the world of composable validation world to uninstall one type of validation
54-
// We can either get rid of all SingleSigner signers. What about the nested ones?
55-
_transferSigner(abi.decode(data, (uint32)), address(0));
53+
uint32 entityId = abi.decode(data, (uint32));
54+
_transferSigner(entityId, address(0));
5655
}
5756

5857
/// @inheritdoc IValidationModule

standard/ERCs/erc-6900.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ Each step is modular, supporting different implementations, that allows for open
6464

6565
**Modular Smart Contract Accounts** **MUST** implement
6666

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

@@ -78,7 +77,7 @@ Each step is modular, supporting different implementations, that allows for open
7877

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

81-
**Modules** **May** implement one of the following module types
80+
**Modules** **MAY** implement any of the following module types
8281

8382
- `IValidationModule` to support validations for account.
8483
- `IValidationHookModule` to support hooks for validations.
@@ -411,8 +410,7 @@ interface IValidationHookModule is IModule {
411410
/// @param signature The signature of the message.
412411
function preSignatureValidationHook(uint32 entityId, address sender, bytes32 hash, bytes calldata signature)
413412
external
414-
view
415-
returns (bytes4);
413+
view;
416414
}
417415
```
418416

@@ -532,7 +530,7 @@ During execution uninstallation, the account MUST correctly clear flags and othe
532530

533531
Modular accounts support three different calls flows for validation: user op validation, runtime validation, and signature validation. User op validation happens within the account's implementation of the function `validateUserOp`, defined in the ERC-4337 interface `IAccount`. Runtime validation happens through the dispatcher function `executeWithAuthorization`, or when using direct call validation. Signature validation happens within the account's implementation of the function `isValidSignature`, defined in ERC-1271.
534532

535-
For each of these validation types, an account implementation may specify its own format for selecting which validation function to use, as well as any per-hook data for validation hooks.
533+
For each of these validation types, an account implementation MAY specify its own format for selecting which validation function to use, as well as any per-hook data for validation hooks.
536534

537535
Within the implementation of each type of validation function, the modular account MUST check that the provided validation function applies to the given function selector intended to be run. Then, the account MUST execute all validation hooks of the corresponding type associated with the validation function in use. These hooks MUST be executed in the order specified during installation. After the execution of validation hooks, the account MUST invoke the validation function of the corresponding type. If any validation hooks or the validation function revert, the account MUST revert. It SHOULD include the module's revert data within its revert data.
538536

@@ -588,7 +586,9 @@ This proposal includes several interfaces that build on ERC-4337. First, we stan
588586

589587
## Backwards Compatibility
590588

591-
TODO
589+
Existing accounts that are deployed as proxies may have the ability to upgrade account implementations to one that supports this standard for modularity. Depending on implementation logic, existing modules may be wrapped in an adapter contract to adhere to the standard.
590+
591+
The standard also allows for flexibility in account implementations, including accounts that have certain features implemented without modules, so usage of modules may be gradually introduced.
592592

593593
## Reference Implementation
594594

0 commit comments

Comments
 (0)