Files
openzeppelin-contracts/contracts/token/ERC721
Hadrien Croubois a035b235b4 Release v4.6 (#3358)
* 4.6.0-rc.0

* Fix release script to only release @openzeppelin/contracts

(cherry picked from commit 2bd75a44bb)

* make ERC2981:royaltyInfo public (#3305)

(cherry picked from commit d2832ca7a9)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>

* add transpilation guards to the crosschain mocks (#3306)

(cherry picked from commit 9af5af8fff)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>

* Fix tests on upgradeable contracts after transpilation

(cherry picked from commit 0762479dd5)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>

* Remove unused constructor argument

(cherry picked from commit 69c3781043)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>

* Bump minimum Solidity version for Initializable.sol to 0.8.2 (#3328)

(cherry picked from commit cb14ea3c5c)

* Fix update-comment script to ignore invalid tags

(cherry picked from commit 848fef5b6c)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>

* 4.6.0

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
2022-04-27 09:34:09 +02:00
..
2022-04-27 09:34:09 +02:00
2022-02-09 18:16:53 -03:00
2021-12-14 13:14:39 -03:00
2022-04-27 09:34:09 +02:00
2022-04-27 09:34:09 +02:00
2022-04-27 09:34:09 +02:00

= ERC 721

[.readme-notice]
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc721

This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC721 Non-Fungible Token Standard].

TIP: For a walk through on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide].

The EIP specifies four interfaces:

* {IERC721}: Core functionality required in all compliant implementation.
* {IERC721Metadata}: Optional extension that adds name, symbol, and token URI, almost always included.
* {IERC721Enumerable}: Optional extension that allows enumerating the tokens on chain, often not included since it requires large gas overhead.
* {IERC721Receiver}: An interface that must be implemented by contracts if they want to accept tokens through `safeTransferFrom`.

OpenZeppelin Contracts provides implementations of all four interfaces:

* {ERC721}: The core and metadata extensions, with a base URI mechanism.
* {ERC721Enumerable}: The enumerable extension.
* {ERC721Holder}: A bare bones implementation of the receiver interface.

Additionally there are a few of other extensions:

* {ERC721URIStorage}: A more flexible but more expensive way of storing metadata.
* {ERC721Votes}: Support for voting and vote delegation.
* {ERC721Royalty}: A way to signal royalty information following ERC2981.
* {ERC721Pausable}: A primitive to pause contract operation.
* {ERC721Burnable}: A way for token holders to burn their own tokens.

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.

== Core

{{IERC721}}

{{IERC721Metadata}}

{{IERC721Enumerable}}

{{ERC721}}

{{ERC721Enumerable}}

{{IERC721Receiver}}

== Extensions

{{ERC721Pausable}}

{{ERC721Burnable}}

{{ERC721URIStorage}}

{{ERC721Votes}}

{{ERC721Royalty}}

== Presets

These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.

{{ERC721PresetMinterPauserAutoId}}

== Utilities

{{ERC721Holder}}