diff --git a/src/account/ModularAccount.sol b/src/account/ModularAccount.sol index d0b8350f..6db19139 100644 --- a/src/account/ModularAccount.sol +++ b/src/account/ModularAccount.sol @@ -1,7 +1,9 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.26; -import {ValidationConfig} from "@erc6900/reference-implementation/interfaces/IModularAccount.sol"; +import { + IModularAccount, ValidationConfig +} from "@erc6900/reference-implementation/interfaces/IModularAccount.sol"; import {IEntryPoint} from "@eth-infinitism/account-abstraction/interfaces/IEntryPoint.sol"; import {ModularAccountBase} from "./ModularAccountBase.sol"; @@ -23,4 +25,9 @@ contract ModularAccount is ModularAccountBase { ) external virtual initializer { _installValidation(validationConfig, selectors, installData, hooks); } + + /// @inheritdoc IModularAccount + function accountId() external pure override returns (string memory) { + return "alchemy.modular-account.2.0.0"; + } } diff --git a/src/account/ModularAccountBase.sol b/src/account/ModularAccountBase.sol index b2b90738..828b4ad6 100644 --- a/src/account/ModularAccountBase.sol +++ b/src/account/ModularAccountBase.sol @@ -383,9 +383,7 @@ abstract contract ModularAccountBase is } /// @inheritdoc IModularAccount - function accountId() external pure virtual returns (string memory) { - return "alchemy.modular-account.0.0.1"; - } + function accountId() external pure virtual returns (string memory); /// @inheritdoc UUPSUpgradeable /// @notice May be validated by a global validation. diff --git a/src/account/SemiModularAccountBase.sol b/src/account/SemiModularAccountBase.sol index 187896b9..858a96c5 100644 --- a/src/account/SemiModularAccountBase.sol +++ b/src/account/SemiModularAccountBase.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.26; import {DIRECT_CALL_VALIDATION_ENTITYID} from "@erc6900/reference-implementation/helpers/Constants.sol"; -import {IModularAccount, ModuleEntity} from "@erc6900/reference-implementation/interfaces/IModularAccount.sol"; +import {ModuleEntity} from "@erc6900/reference-implementation/interfaces/IModularAccount.sol"; import {ModuleEntityLib} from "@erc6900/reference-implementation/libraries/ModuleEntityLib.sol"; import {IEntryPoint} from "@eth-infinitism/account-abstraction/interfaces/IEntryPoint.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; @@ -75,11 +75,6 @@ abstract contract SemiModularAccountBase is ModularAccountBase { return _retrieveFallbackSignerUnchecked(_getSemiModularAccountStorage()); } - /// @inheritdoc IModularAccount - function accountId() external pure override returns (string memory) { - return "alchemy.semi-modular-account.0.0.1"; - } - function _execUserOpValidation( ModuleEntity userOpValidationFunction, bytes32 userOpHash, diff --git a/src/account/SemiModularAccountBytecode.sol b/src/account/SemiModularAccountBytecode.sol index b965f349..17dbcd53 100644 --- a/src/account/SemiModularAccountBytecode.sol +++ b/src/account/SemiModularAccountBytecode.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.26; +import {IModularAccount} from "@erc6900/reference-implementation/interfaces/IModularAccount.sol"; import {IEntryPoint} from "@eth-infinitism/account-abstraction/interfaces/IEntryPoint.sol"; import {LibClone} from "solady/utils/LibClone.sol"; @@ -16,6 +17,11 @@ import {SemiModularAccountBase} from "./SemiModularAccountBase.sol"; contract SemiModularAccountBytecode is SemiModularAccountBase { constructor(IEntryPoint anEntryPoint) SemiModularAccountBase(anEntryPoint) {} + /// @inheritdoc IModularAccount + function accountId() external pure override returns (string memory) { + return "alchemy.sma-bytecode.1.0.0"; + } + /// @dev If the fallback signer is set in storage, we ignore the bytecode signer. function _retrieveFallbackSignerUnchecked(SemiModularAccountStorage storage _storage) internal diff --git a/src/account/SemiModularAccountStorageOnly.sol b/src/account/SemiModularAccountStorageOnly.sol index 62851328..ffa6351a 100644 --- a/src/account/SemiModularAccountStorageOnly.sol +++ b/src/account/SemiModularAccountStorageOnly.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.26; +import {IModularAccount} from "@erc6900/reference-implementation/interfaces/IModularAccount.sol"; import {IEntryPoint} from "@eth-infinitism/account-abstraction/interfaces/IEntryPoint.sol"; import {SemiModularAccountBase} from "./SemiModularAccountBase.sol"; @@ -25,4 +26,9 @@ contract SemiModularAccountStorageOnly is SemiModularAccountBase { // initialization. However, reading it here would add costs in the vast majority of cases. emit FallbackSignerSet(address(0), initialSigner); } + + /// @inheritdoc IModularAccount + function accountId() external pure override returns (string memory) { + return "alchemy.sma-storage.1.0.0"; + } } diff --git a/src/modules/permissions/AllowlistModule.sol b/src/modules/permissions/AllowlistModule.sol index 140f19cc..8a3b6c3a 100644 --- a/src/modules/permissions/AllowlistModule.sol +++ b/src/modules/permissions/AllowlistModule.sol @@ -175,7 +175,7 @@ contract AllowlistModule is IExecutionHookModule, IValidationHookModule, ModuleB /// @inheritdoc IModule function moduleId() external pure returns (string memory) { - return "alchemy.allowlist-module.0.0.1"; + return "alchemy.allowlist-module.1.0.0"; } /// @notice Update the token limit of a validation diff --git a/src/modules/permissions/PaymasterGuardModule.sol b/src/modules/permissions/PaymasterGuardModule.sol index 415f9e26..01e980f4 100644 --- a/src/modules/permissions/PaymasterGuardModule.sol +++ b/src/modules/permissions/PaymasterGuardModule.sol @@ -81,7 +81,7 @@ contract PaymasterGuardModule is ModuleBase, IValidationHookModule { /// @inheritdoc IModule function moduleId() external pure returns (string memory) { - return "alchemy.paymaster-guard-module.0.0.1"; + return "alchemy.paymaster-guard-module.1.0.0"; } /// @inheritdoc ModuleBase diff --git a/src/modules/permissions/TimeRangeModule.sol b/src/modules/permissions/TimeRangeModule.sol index 9b471b04..9446bffb 100644 --- a/src/modules/permissions/TimeRangeModule.sol +++ b/src/modules/permissions/TimeRangeModule.sol @@ -104,7 +104,7 @@ contract TimeRangeModule is IValidationHookModule, ModuleBase { /// @inheritdoc IModule function moduleId() external pure returns (string memory) { - return "alchemy.timerange-module.0.0.1"; + return "alchemy.time-range-module.1.0.0"; } /// @notice Sets the time range for the sending account (`msg.sender`) and a given entity id. diff --git a/src/modules/validation/SingleSignerValidationModule.sol b/src/modules/validation/SingleSignerValidationModule.sol index 88c6dd7b..97885fcf 100644 --- a/src/modules/validation/SingleSignerValidationModule.sol +++ b/src/modules/validation/SingleSignerValidationModule.sol @@ -141,7 +141,7 @@ contract SingleSignerValidationModule is IValidationModule, ModuleBase { /// @inheritdoc IModule function moduleId() external pure returns (string memory) { - return "erc6900.ecdsa-validation-module.1.0.0"; + return "alchemy.single-signer-validation-module.1.0.0"; } function supportsInterface(bytes4 interfaceId) diff --git a/test/account/ModularAccount.t.sol b/test/account/ModularAccount.t.sol index 2b4ac636..f0bf47f0 100644 --- a/test/account/ModularAccount.t.sol +++ b/test/account/ModularAccount.t.sol @@ -230,7 +230,7 @@ contract ModularAccountTest is AccountTestBase { function test_accountId() public withSMATest { string memory accountId = account1.accountId(); - assertEq(accountId, _isSMATest ? "alchemy.semi-modular-account.0.0.1" : "alchemy.modular-account.0.0.1"); + assertEq(accountId, _isSMATest ? "alchemy.sma-bytecode.1.0.0" : "alchemy.modular-account.2.0.0"); } function test_contractInteraction() public withSMATest { diff --git a/test/modules/TimeRangeModule.t.sol b/test/modules/TimeRangeModule.t.sol index aa2f1da5..4d3ec1f0 100644 --- a/test/modules/TimeRangeModule.t.sol +++ b/test/modules/TimeRangeModule.t.sol @@ -54,7 +54,7 @@ contract TimeRangeModuleTest is CustomValidationTestBase { } function test_timeRangeModule_moduleId() public view { - assertEq(timeRangeModule.moduleId(), "alchemy.timerange-module.0.0.1"); + assertEq(timeRangeModule.moduleId(), "alchemy.time-range-module.1.0.0"); } function test_timeRangeModule_install() public withSMATest {