IERC721Enumerable.sol 936 B

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