Loading...
ERC-20, ERC-721, and ERC-1155
Token standards define common interfaces so wallets, exchanges, and dApps can interact with any token.
ERC-20 (Fungible Tokens): The standard for currencies and utility tokens.
• balanceOf(address) — Check balance
• transfer(to, amount) — Send tokens
• approve(spender, amount) + transferFrom(from, to, amount) — Allow a contract to spend your tokens
• Examples: USDC, LINK, UNI
ERC-721 (Non-Fungible Tokens): Each token has a unique ID.
• ownerOf(tokenId) — Who owns this token?
• transferFrom(from, to, tokenId) — Transfer a specific token
• tokenURI(tokenId) — Link to metadata (image, name, properties)
• Examples: Bored Apes, CryptoPunks
ERC-1155 (Multi-Token): Supports both fungible and non-fungible tokens in one contract. Efficient for games where you need currencies AND unique items.
OpenZeppelin provides battle-tested implementations of all these standards. Always inherit from their contracts rather than writing your own.