IERC721Enumerable.sol 903 B

123456789101112131415161718192021222324252627
  1. pragma solidity ^0.6.2;
  2. import "./IERC721.sol";
  3. /**
  4. * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
  5. * @dev See https://eips.ethereum.org/EIPS/eip-721
  6. */
  7. interface IERC721Enumerable is IERC721 {
  8. /**
  9. * @dev Returns the total amount of tokens stored by the contract.
  10. */
  11. function totalSupply() external view returns (uint256);
  12. /**
  13. * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
  14. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
  15. */
  16. function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
  17. /**
  18. * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
  19. * Use along with {totalSupply} to enumerate all tokens.
  20. */
  21. function tokenByIndex(uint256 index) external view returns (uint256);
  22. }