From b8c96c54d798433a483bfaa0ec15deccc1ce60ec Mon Sep 17 00:00:00 2001 From: gabrielstoica Date: Thu, 27 Jun 2024 13:19:38 +0300 Subject: [PATCH] docs(ERC7578): remove 'setProperties' method --- ERCS/erc-7578.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/ERCS/erc-7578.md b/ERCS/erc-7578.md index c0ab192e99..74e6d91b3a 100644 --- a/ERCS/erc-7578.md +++ b/ERCS/erc-7578.md @@ -103,27 +103,19 @@ interface IERC7578 { * @param tokenId The token ID of the minted token */ function getProperties(uint256 tokenId) external view returns (Properties memory properties); - - /** - * @notice Sets the properties of the `tokenId` token - * @param tokenId The ID of the token - * @param properties The properties of the token - */ - function setProperties(uint256 tokenId, Properties calldata properties) external; } ``` - -The `setProperties(uint256 tokenId, Properties calldata properties)` method SHOULD be called before minting a token. By not calling this method before minting a ERC-721 token, one risks that the asset's provenance represented by the token cannot be established. - -The `getProperties(uint256 tokenId)` function MUST return the unique `properties` of a token. If the ERC-721 token is burned or has no properties set, it SHOULD return an empty `Properties` struct. - When `properties` are set, the `PropertiesSet(uint256 indexed tokenId, Properties properties)` event is emitted. When `properties` are removed, the `PropertiesRemoved(uint256 indexed tokenId)` event is emitted. +The `getProperties(uint256 tokenId)` function MUST return the unique `properties` of a token. If the ERC-721 token is burned or has no properties set, it SHOULD return an empty `Properties` struct. + ## Rationale -When a token is minted, its properties SHOULD be initialized beforehand. Consequently, when a token has valid properties and is to be burned, the properties MUST be removed. +When a token is minted, its properties SHOULD be initialized beforehand. By not initializing a token's properties before minting, one risks that the asset's provenance represented by the token cannot be established. + +When a token with valid properties is to be burned, the properties MUST be removed. Contract level validation is not used on the properties as we believe the accuracy of the data declared is the responsibility of the token issuer. This builds trust on the token issuer and the token itself. @@ -163,7 +155,7 @@ contract ERC7578 is ERC721, IERC7578 { constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {} /** - * @inheritdoc IERC7578 + * @notice Initializes the ERC-7578 properties of the `tokenId` token */ function setProperties(uint256 tokenId, Properties calldata properties) public { _properties[tokenId] = Properties({