Skip to content

Commit 96fc9d5

Browse files
committed
feat: update accountId and moduleId to use period delimiters
1 parent b5b8264 commit 96fc9d5

17 files changed

+21
-19
lines changed

src/account/ReferenceModularAccount.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ contract ReferenceModularAccount is
281281

282282
/// @inheritdoc IModularAccount
283283
function accountId() external pure virtual returns (string memory) {
284-
return "erc6900/reference-modular-account/0.8.0";
284+
return "erc6900.reference-modular-account.0.8.0";
285285
}
286286

287287
/// @inheritdoc UUPSUpgradeable

src/account/SemiModularAccount.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ contract SemiModularAccount is ReferenceModularAccount {
9393

9494
/// @inheritdoc IModularAccount
9595
function accountId() external pure override returns (string memory) {
96-
return "erc6900/reference-semi-modular-account/0.8.0";
96+
return "erc6900.reference-semi-modular-account.0.8.0";
9797
}
9898

9999
function replaySafeHash(bytes32 hash) public view virtual returns (bytes32) {

src/interfaces/IModularAccount.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ interface IModularAccount {
9999
) external;
100100

101101
/// @notice Return a unique identifier for the account implementation.
102-
/// @dev This function MUST return a string in the format "vendor/account/semver".
102+
/// @dev This function MUST return a string in the format "vendor.account.semver". The vendor and account
103+
/// names MUST NOT contain a period character.
103104
/// @return The account ID.
104105
function accountId() external view returns (string memory);
105106
}

src/interfaces/IModule.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ interface IModule is IERC165 {
1717
function onUninstall(bytes calldata data) external;
1818

1919
/// @notice Return a unique identifier for the module.
20-
/// @dev This function MUST return a string in the format "vendor/module/semver".
20+
/// @dev This function MUST return a string in the format "vendor.module.semver". The vendor and module
21+
/// names MUST NOT contain a period character.
2122
/// @return The module ID.
2223
function moduleId() external view returns (string memory);
2324
}

src/modules/ERC20TokenLimitModule.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ contract ERC20TokenLimitModule is BaseModule, IExecutionHookModule {
115115

116116
/// @inheritdoc IModule
117117
function moduleId() external pure returns (string memory) {
118-
return "erc6900/erc20-token-limit-module/1.0.0";
118+
return "erc6900.erc20-token-limit-module.1.0.0";
119119
}
120120

121121
/// @inheritdoc BaseModule

src/modules/NativeTokenLimitModule.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ contract NativeTokenLimitModule is BaseModule, IExecutionHookModule, IValidation
116116

117117
/// @inheritdoc IModule
118118
function moduleId() external pure returns (string memory) {
119-
return "erc6900/native-token-limit-module/1.0.0";
119+
return "erc6900.native-token-limit-module.1.0.0";
120120
}
121121

122122
// ┏━━━━━━━━━━━━━━━┓

src/modules/TokenReceiverModule.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ contract TokenReceiverModule is BaseModule, IExecutionModule, IERC721Receiver, I
8282

8383
/// @inheritdoc IModule
8484
function moduleId() external pure returns (string memory) {
85-
return "erc6900/token-receiver-module/1.0.0";
85+
return "erc6900.token-receiver-module.1.0.0";
8686
}
8787
}

src/modules/permissionhooks/AllowlistModule.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ contract AllowlistModule is IValidationHookModule, BaseModule {
9191

9292
/// @inheritdoc IModule
9393
function moduleId() external pure returns (string memory) {
94-
return "erc6900/allowlist-module/0.0.1";
94+
return "erc6900.allowlist-module.0.0.1";
9595
}
9696

9797
function setAllowlistTarget(uint32 entityId, address target, bool allowed, bool hasSelectorAllowlist) public {

src/modules/validation/SingleSignerValidationModule.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ contract SingleSignerValidationModule is ISingleSignerValidationModule, ReplaySa
114114

115115
/// @inheritdoc IModule
116116
function moduleId() external pure returns (string memory) {
117-
return "erc6900/single-signer-validation-module/1.0.0";
117+
return "erc6900.single-signer-validation-module.1.0.0";
118118
}
119119

120120
function supportsInterface(bytes4 interfaceId)

test/account/ReferenceModularAccount.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ contract ReferenceModularAccountTest is AccountTestBase {
189189
assertEq(
190190
accountId,
191191
vm.envOr("SMA_TEST", false)
192-
? "erc6900/reference-semi-modular-account/0.8.0"
193-
: "erc6900/reference-modular-account/0.8.0"
192+
? "erc6900.reference-semi-modular-account.0.8.0"
193+
: "erc6900.reference-modular-account.0.8.0"
194194
);
195195
}
196196

0 commit comments

Comments
 (0)