From 0e09b85db0a1f1f3d482530487150b8826ea5217 Mon Sep 17 00:00:00 2001 From: steven2308 Date: Tue, 9 Jan 2024 10:58:37 -0500 Subject: [PATCH] Updates docs. --- README.md | 1 + contracts/RMRK/extension/tokenHolder/IERC7590.sol | 6 +++--- docs/RMRK/extension/tokenHolder/IERC7590.md | 2 +- docs/RMRK/extension/tokenHolder/RMRKTokenHolder.md | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 028626cd..12a36544 100644 --- a/README.md +++ b/README.md @@ -33,5 +33,6 @@ So far we have created 6 modules as ERC proposals, all of which are ERC721 compa - Soulbound: [ERC-6454: Minimal Transferable NFT detection interface](https://eips.ethereum.org/EIPS/eip-6454) - Emotable: [ERC-7409: Public Non-Fungible Tokens Emote Repository](https://eips.ethereum.org/EIPS/eip-7409) - Dynamic Attributes: [ERC-7508: Dynamic On-Chain Token Attributes Repository ](https://eips.ethereum.org/EIPS/eip-7508) +- ERC20-Holder: [ERC-7590: ERC-20 Holder Extension for NFTs ](https://eips.ethereum.org/EIPS/eip-7590) ![RMRK Modules](/img/General_Overview_Modules.png) diff --git a/contracts/RMRK/extension/tokenHolder/IERC7590.sol b/contracts/RMRK/extension/tokenHolder/IERC7590.sol index 4dc9786f..133ebfa2 100644 --- a/contracts/RMRK/extension/tokenHolder/IERC7590.sol +++ b/contracts/RMRK/extension/tokenHolder/IERC7590.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.21; @@ -47,8 +47,8 @@ interface IERC7590 is IERC165 { /** * @notice Transfer ERC-20 tokens from a specific token. * @dev The balance MUST be transferred from this smart contract. - * @dev Implementers should validate that the `msg.sender` is either the token owner or approved to manage it before calling this. - * @dev Must increase the transfer-out-nonce for the tokenId + * @dev MUST increase the transfer-out-nonce for the tokenId + * @dev MUST revert if the `msg.sender` is not the owner of the NFT or approved to manage it. * @param erc20Contract The address of the ERC-20 smart contract * @param tokenId The ID of the token to transfer the ERC-20 tokens from * @param amount The number of ERC-20 tokens to transfer diff --git a/docs/RMRK/extension/tokenHolder/IERC7590.md b/docs/RMRK/extension/tokenHolder/IERC7590.md index 9e1b996c..0b435e23 100644 --- a/docs/RMRK/extension/tokenHolder/IERC7590.md +++ b/docs/RMRK/extension/tokenHolder/IERC7590.md @@ -104,7 +104,7 @@ function transferHeldERC20FromToken(address erc20Contract, uint256 tokenId, addr Transfer ERC-20 tokens from a specific token. -*The balance MUST be transferred from this smart contract.Implementers should validate that the `msg.sender` is either the token owner or approved to manage it before calling this.Must increase the transfer-out-nonce for the tokenId* +*The balance MUST be transferred from this smart contract.MUST increase the transfer-out-nonce for the tokenIdMUST revert if the `msg.sender` is not the owner of the NFT or approved to manage it.* #### Parameters diff --git a/docs/RMRK/extension/tokenHolder/RMRKTokenHolder.md b/docs/RMRK/extension/tokenHolder/RMRKTokenHolder.md index ef44d579..e1954bfc 100644 --- a/docs/RMRK/extension/tokenHolder/RMRKTokenHolder.md +++ b/docs/RMRK/extension/tokenHolder/RMRKTokenHolder.md @@ -104,7 +104,7 @@ function transferHeldERC20FromToken(address erc20Contract, uint256 tokenId, addr Transfer ERC-20 tokens from a specific token. -*The balance MUST be transferred from this smart contract.Implementers should validate that the `msg.sender` is either the token owner or approved to manage it before calling this.Must increase the transfer-out-nonce for the tokenId* +*The balance MUST be transferred from this smart contract.MUST increase the transfer-out-nonce for the tokenIdMUST revert if the `msg.sender` is not the owner of the NFT or approved to manage it.* #### Parameters