12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- pragma solidity ^0.4.23;
- import "./ERC721Basic.sol";
- /**
- * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
- * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
- */
- contract ERC721Enumerable is ERC721Basic {
- bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63;
- /**
- * 0x780e9d63 ===
- * bytes4(keccak256('totalSupply()')) ^
- * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^
- * bytes4(keccak256('tokenByIndex(uint256)'))
- */
- constructor()
- public
- {
- _registerInterface(InterfaceId_ERC721Enumerable);
- }
- function totalSupply() public view returns (uint256);
- function tokenOfOwnerByIndex(
- address _owner,
- uint256 _index
- )
- public
- view
- returns (uint256 _tokenId);
- function tokenByIndex(uint256 _index) public view returns (uint256);
- }
- /**
- * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
- * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
- */
- contract ERC721Metadata is ERC721Basic {
- bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f;
- /**
- * 0x5b5e139f ===
- * bytes4(keccak256('name()')) ^
- * bytes4(keccak256('symbol()')) ^
- * bytes4(keccak256('tokenURI(uint256)'))
- */
- constructor()
- public
- {
- _registerInterface(InterfaceId_ERC721Metadata);
- }
- function name() external view returns (string _name);
- function symbol() external view returns (string _symbol);
- function tokenURI(uint256 _tokenId) public view returns (string);
- }
- /**
- * @title ERC-721 Non-Fungible Token Standard, full implementation interface
- * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
- */
- contract ERC721 is ERC721Basic, ERC721Enumerable, ERC721Metadata {
- }
|