ERC-721 is the standard that defines non-fungible tokens on Ethereum. Unlike ERC-20 tokens where every unit is identical, each ERC-721 token has a unique identifier and represents distinct ownership of a digital or physical asset.
Core Functions
| Function | Purpose |
|---|
ownerOf(tokenId) | Get owner of a specific token |
balanceOf(address) | Count tokens owned by an address |
transferFrom(from, to, tokenId) | Transfer a specific token |
approve(to, tokenId) | Approve address for a specific token |
setApprovalForAll(operator, bool) | Approve for all tokens |
tokenURI(tokenId) | Get metadata URI for a token |
What Makes ERC-721 Unique
Non-Fungibility
- Each token has a unique
tokenId
- Tokens are not interchangeable
- Each can have different value and properties
tokenURI points to JSON metadata (image, name, attributes)
- Usually stored on IPFS for permanence
- Defines visual traits and properties
Ownership Model
- One address can own multiple NFTs
- Each NFT has exactly one owner
- Ownership is tracked on-chain
Common Use Cases
- Digital art: Provenance and ownership of artwork
- Collectibles: PFP collections, trading cards
- Gaming assets: Characters, items, land
- Domain names: ENS domains are ERC-721
- Membership passes: Access tokens for communities
ERC-721 vs ERC-20
| Feature | ERC-721 | ERC-20 |
|---|
| Fungibility | Non-fungible (unique) | Fungible (identical) |
| Unit | tokenId | Amount |
| Supply | Limited per tokenId | Unlimited divisible units |
| Use case | Art, collectibles, identity | Currency, governance, utility |
Extensions
- ERC-721A: Batch minting with reduced gas (Azuki)
- ERC-4907: Rental standard with expiry
- ERC-6551: Token-bound accounts (NFTs that own assets)