ERC-721: The Ethereum Standard for Non-Fungible Tokens

ERC-721: The Ethereum Standard for Non-Fungible Tokens

ERC-721 is a standard for non-fungible tokens (NFTs) on Ethereum. A standard is a published set of rules. Non-fungible means that each token is distinct from the others. ERC-721 specifies an interface, which is the list of functions and events that a smart contract provides. A smart contract is a program stored on a blockchain. For ERC-721, a token is a unit issued on an existing blockchain through a smart contract.

ERC-721 is published as an Ethereum Improvement Proposal (EIP), which is a design document for the Ethereum community. The proposal’s number is 721, so ERC-721 is also written EIP-721. ERC is the category of proposals for application-level standards, meaning standards that applications on Ethereum follow, such as token standards.

The code in ERC-721 names its interface ERC721. An ERC-721 token is a token issued by a contract that follows ERC-721.

A function is a named operation that a contract provides and that a user can call. An event is a notice that a contract records on the blockchain when something changes, so that software can follow the change. To emit an event is to record it.

A blockchain is the shared record of transactions, kept in order. A transaction is a request that a user sends to a blockchain, such as a request to move a token. An address is an identifier on a blockchain for a user or for a smart contract.

What Does the ERC-721 Standard Specify?

The ERC-721 standard specifies an interface: the functions that a contract must provide and the events that it must emit. Software can then call contracts that follow ERC-721 in the same way.

ERC-721 also requires interface detection through ERC-165, which is a standard that lets a contract state which interfaces it supports.

ERC-721 describes two optional extensions. The metadata extension adds functions that return a name and a symbol for a contract’s tokens and a link for each token ID, and an enumeration extension adds functions that list the tokens a contract tracks.

ERC-721 is one NFT standard, and it was written for Ethereum. Other blockchains and other standards can work differently from ERC-721.

A contract that follows ERC-721 tells its tokens apart by token ID, a number that the contract gives to each token. The address of the contract that tracks the tokens, together with a token ID, identifies one token, and ERC-721 requires a token ID to stay the same for as long as the contract exists.

ERC-721 vs ERC-20: How Do the Two Standards Differ?

ERC-721 and ERC-20 differ in what a contract tracks, what a transfer names, and what an approval covers. ERC-20 is a standard for fungible tokens, meaning tokens whose units are interchangeable, so that one unit is the same as another. ERC-721 is a standard for non-fungible tokens, which a contract tells apart by token ID, so swapping two of them is not a swap of like for like.

  • An ERC-20 contract records how many units each address holds, while an ERC-721 contract records which address controls each token ID.
  • An ERC-20 transfer names an amount of tokens, while an ERC-721 transfer names a token ID.
  • An ERC-20 approval covers an amount that another address may transfer, while an ERC-721 approval covers either one token ID or, when it names an operator, all of the tokens that an address controls in the same contract. An operator is an address that the address controlling the tokens has allowed to transfer all of them.

Which Functions and Events Does ERC-721 Define?

This table lists, by name, the functions and events that ERC-721 defines, together with the interface-detection function from ERC-165, and says what each one does.

Name

Kind

What it does

balanceOf

function

Returns how many tokens an address controls.

ownerOf

function

Returns the address that controls a token ID.

transferFrom

function

Moves a token ID from one address to another.

safeTransferFrom

function

Moves a token ID from one address to another and also runs a receiver check when the receiving address is a smart contract.

approve

function

Lets one named address transfer one token ID.

getApproved

function

Returns the address approved to transfer one token ID.

setApprovalForAll

function

Lets an address enable or disable an operator for all of its tokens in the same contract.

isApprovedForAll

function

Returns whether one address is an operator for another address.

supportsInterface

function, from ERC-165

Returns whether a contract supports a given interface.

Transfer

event

Announces that the address that controls a token has changed.

Approval

event

Announces that the address approved for a token ID has been changed or reaffirmed.

ApprovalForAll

event

Announces that an operator has been enabled or disabled.

What Function Checks the Receiving Contract?

The safeTransferFrom function runs a receiver check after it moves a token. When the receiving address is a smart contract, the ERC-721 contract calls a function on it named onERC721Received, which is the receiver function. The receiving contract provides the receiver function, and the function returns a specific answer that ERC-721 defines and that signals to the ERC-721 contract that the receiving contract accepts the transfer. If the receiving contract returns anything else, the transaction is canceled, which ERC-721 calls a revert.

The transferFrom function does not call a receiver function. ERC-721 leaves the check that the receiving address can receive tokens to the caller, meaning whoever sends the transaction that calls the function. A token sent to a contract that does not provide the receiver function may be lost.

How Do Approvals and Operators Work?

An approval lets another address transfer a token. The approve function names one address for one token ID, and getApproved returns that address. ERC-721 says that the approved address is reset to none when the token is transferred.

An operator is an address that has been allowed, through setApprovalForAll, to transfer all of the tokens that another address controls in the same contract. ERC-721 requires a contract to allow more than one operator for each address that controls tokens, and isApprovedForAll returns whether an address is an operator for another address.

Under ERC-721, a transfer can be requested by the address that controls the token, by an operator of that address, or by the address approved for that token ID.

What Does the Optional Metadata Extension Add?

The optional metadata extension of ERC-721 adds three functions to a contract: name, symbol, and tokenURI. Metadata is data that describes tokens, and these three functions return it.

The name function returns a name for the tokens that a contract tracks, and symbol returns an abbreviated name for them.

The tokenURI function returns a URI for one token ID. A URI, short for uniform resource identifier, is a link. A contract that leaves out the extension has no URI.

ERC-721 says that the URI which tokenURI returns may point to a JSON file, which is a text format for structured data. The file can hold name, description, and image fields.

ERC-721 allows a contract to change the URI that it returns for a token ID, so the same token ID can later lead to a different file. ERC-721 does not say where the file that the URI points to is stored.

What Does ERC-721 Leave to Each Contract?

As of October 2026, ERC-721 does not define a token’s content, any rights connected to a token, where a token’s files are stored, how tokens are created or destroyed, or a token’s legal status. The Non-fungible token (NFT) glossary entry explains what the record of a token, meaning the information that a contract keeps about each token, leaves out.

Contracts that follow ERC-721 can still differ in behavior. ERC-721 lists the cases in which a transfer must fail, and it allows a contract to cancel a transfer in other cases, for example while transfers are paused. A contract can therefore refuse a transfer for reasons that ERC-721 does not list.

January 5, 2026

GoMining News

You might be interested in: