[fix] 修复Solidity-103, 34课 ERC721 文档与示例代码不相符的问题. #244
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
问题
文档与代码不相符
Solidity-103 34课 ERC271 文档描述 :
但示例代码只声明了
IERC721
和IERC721Metadata
接口, 并没有声明IERC165
:缺失上下文信息, 函数理解有难度
_checkOnERC721Received
通过检查onERC721Received
的selector 来判断是否实现了OnERC721Received
, 但是并没有提供上下文说明为什么可以这么判断, 不便于初学者理解解决方案
OnERC721Received
函数的注释,以解释为什么可以通过"返回onERC721Received的selector"来判断是否实现了IERC721Receiver
接口