Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] 修复Solidity-103, 34课 ERC721 文档与示例代码不相符的问题. #244

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/solidity-103/34_ERC721/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ interface IERC721 is IERC165 {
```solidity
// ERC721接收者接口:合约必须实现这个接口来通过安全转账接收ERC721
interface IERC721Receiver {
/**
* @dev 每个 {IERC721} `tokenId` 通过 {IERC721-safeTransferFrom} 由 `operator` 从 `from` 转移到
* 该合约时,该函数会被调用。
*
* 该函数必须返回其 Solidity selector 以确认代币的转账。
* 如果返回了其他值,或者 tokenId 接收者没有实现该接口,则转账将被回滚。
*
*/
function onERC721Received(
address operator,
address from,
Expand Down Expand Up @@ -209,7 +217,7 @@ import "./IERC721Receiver.sol";
import "./IERC721Metadata.sol";
import "./String.sol";

contract ERC721 is IERC721, IERC721Metadata{
contract ERC721 is IERC721, IERC165, IERC721Metadata{
using Strings for uint256; // 使用String库,

// Token名称
Expand Down