README.adoc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. = ERC 721
  2. [.readme-notice]
  3. NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc721
  4. This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC721 Non-Fungible Token Standard].
  5. TIP: For a walk through on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide].
  6. The EIP consists of three interfaces, found here as {IERC721}, {IERC721Metadata}, and {IERC721Enumerable}. Only the first one is required in a contract to be ERC721 compliant. However, all three are implemented in {ERC721}.
  7. Additionally, {IERC721Receiver} can be used to prevent tokens from becoming forever locked in contracts. Imagine sending an in-game item to an exchange address that can't send it back!. When using <<IERC721-safeTransferFrom,`safeTransferFrom`>>, the token contract checks to see that the receiver is an {IERC721Receiver}, which implies that it knows how to handle {ERC721} tokens. If you're writing a contract that needs to receive {ERC721} tokens, you'll want to include this interface.
  8. Additionally there are multiple custom extensions, including:
  9. * designation of addresses that can pause token transfers for all users ({ERC721Pausable}).
  10. * destruction of own tokens ({ERC721Burnable}).
  11. NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC721 (such as <<ERC721-_mint-address-uint256-,`_mint`>>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc721.adoc#Presets[ERC721 Presets] (such as {ERC721PresetMinterPauserAutoId}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.
  12. == Core
  13. {{IERC721}}
  14. {{IERC721Metadata}}
  15. {{IERC721Enumerable}}
  16. {{ERC721}}
  17. {{IERC721Receiver}}
  18. == Extensions
  19. {{ERC721Pausable}}
  20. {{ERC721Burnable}}
  21. == Convenience
  22. {{ERC721Holder}}