function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
function approve(address _approved, uint256 _tokenId) external payable;
function setApprovalForAll(address _operator, bool _approved) external;
function getApproved(uint256 _tokenId) external view returns (address);
function isApprovedForAll(address _owner, address _operator) external view returns (bool);
function supportsInterface(bytes4 interfaceID) external view returns (bool);
Based on above interface, developers may customize tokens by adding new features and logics, and deploy on Klaytn network. For more information, refer to official ERC-721 specification.
In this tutorial, you are going to implement MyERC721Card.sol which implements a card-type non-fungible token, i.e. MyERC721Card, which is an ERC-721 token. Each MyERC721Card has name and level, e.g. "King" with level 1, "Queen" with level 1.
MyERC721Card.sol is based on OpenZeppelin's ERC721 implementation. A major part of the code in this tutorial is forked from OpenZeppelin 2.3 .
The rest of this tutorial is organized as follows.