You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.8 KiB
70 lines
1.8 KiB
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 {
|
|
}
|
|
|