ERC-721 is a technical standard on the Ethereum blockchain for creating non-fungible tokens (NFTs). Unlike fungible tokens such as ERC-20, where each token is identical and interchangeable, ERC-721 tokens are unique and indivisible. They represent ownership of distinct digital or physical assets.
ERC-721 tokens have several key characteristics:
transferFrom()
, ownerOf()
, balanceOf()
, approve()
, and getApproved()
for managing tokens.ERC-721 operates through smart contracts on the Ethereum blockchain. These contracts define functions to create, transfer, and manage NFTs. Each token is linked to a unique tokenId
and contract address, forming a globally unique identifier. This standard ensures that tokens can be tracked individually, preventing duplication or division.
ERC-721 is used in various industries:
William Entriken, Dieter Shirley, Jacob Evans, and Nastassia Sachs proposed the ERC-721 standard in January 2018. It was developed to overcome the limitations of the ERC-20 standard, which is unsuitable for representing unique assets.
The success of projects like CryptoKitties showed the potential of non-fungible tokens, leading to the widespread adoption of ERC-721.
ERC-721 defines mandatory and optional functions that a smart contract must implement to comply with the standard:
balanceOf(address _owner)
: Returns the number of tokens owned by an address.ownerOf(uint256 _tokenId)
: Returns the owner of a specific token.transferFrom(address _from, address _to, uint256 _tokenId)
: Transfers ownership of a token.approve(address _approved, uint256 _tokenId)
: Approves another address to transfer a specific token.getApproved(uint256 _tokenId)
: Returns the approved address for a token.ERC721Metadata
): Allows tokens to have additional metadata like name, description, and image URI.ERC721Enumerable
): Enables enumerating all tokens in the contract and tokens owned by a particular address.The primary difference between ERC-721 and ERC-20 is fungibility:
Additionally, ERC-20 supports fractional ownership through decimals, while ERC-721 tokens are indivisible.
Several projects utilize the ERC-721 standard:
ERC-721 continues to evolve with developments aimed at enhancing scalability and reducing transaction costs. Innovations like Ethereum 2.0 and cross-chain solutions are expected to address current limitations. These advancements will foster broader adoption and enable more diverse applications of non-fungible tokens.