What is ERC721 Token? - GeeksforGeeks (2024)

    • Trending Now
    • DSA
    • Web Tech
    • Foundational Courses
    • Data Science
    • Practice Problem
    • Python
    • Machine Learning
    • JavaScript
    • System Design
    • Django
    • DevOps Tutorial
    • Java
    • C
    • C++
    • ReactJS
    • NodeJS
    • CP Live
    • Aptitude
    • Puzzles
    • Projects

    Open In App

    • What is ERC721 Token?
    • What is a Cryptographic Token?
    • What is a Security Token?
    • What is Solana?
    • What is Real-Estate Tokenization?
    • What are Ethereum EIPs?
    • What is Network Access Control?
    • What is Dogecoin ?
    • What are Banking Trojans?
    • What are Altcoins?
    • What is Stellar Blockchain?
    • What is SS7 Protocol Stack?
    • What is Cardano ?
    • What is Bitcoin?
    • What is Wide-Mouth Frog?
    • What is OAuth (Open Authorization) ?
    • What is Card Tokenization and its Benefits
    • What is Signaling System-7 ?
    • What is a Subordinated Note?

    Last Updated : 26 Feb, 2023

    Improve

    ERC or Ethereum Request for Comments is simply a guideline or a template that all Ethereum-based tokens should follow. Ethereum’s smart contract programmers are accountable for writing ERC-related documents to describe the set of rules that every Ethereum-based Token must follow.

    A token is basically a digital asset that represents something. It can be traded, sold, or bought by a user. It is a kind of virtual currency. They are used for investment purposes, to store value, to make purchases, etc. These are used to facilitate transactions along a blockchain.

    There are two types of tokens:

    • Fungible tokens: Fungible tokens are the tokens that are mutable or whose values can be changed. It can be exchanged with another fungible token because these have the same values. For example, Bitcoin, DAI, and other cryptocurrencies. Dollars, bars of gold, etc are other examples of fungible assets.
    • Non-fungible tokens: These are the tokens that have a unique value, code, and metadata. No two non-fungible tokens can replace another, because the two are unique. For example, digit assets like in-game avatars, digital and non-digital collectibles, and even tickets are all non-fungible.

    The following topics will be discussed here:

    1. What is ERC-721?
    2. Who Invented ERC-721?
    3. What’s so special about ERC-721?
    4. How are ERC-721 NFTs produced?
    5. How do you get hold of ERC-721 NFTs?
    6. What can you do with ERC-721 NFTs?
    7. How are ERC-721 transferred?

    Let’s start discussing each of these in detail.

    What is the ERC-721 token?

    ERC-721 is basically a template or a guideline that other developers agree to follow. It is a widely used standard. Being a widely used standard also means being compatible with a wide range of applications.

    • ERC-721 is a standard for “non-fungible” tokens. A non-fungible token is the type of token that is unique. These are cryptographic assets on a blockchain that has a unique code and metadata differentiating them from one another.
    • The ERC-721 standard non-fungible tokens can be seen in blockchain-based games where each asset is unique and players can trade it and sell or buy items with it.
    • One of the examples that use the ERC-721 non-fungible tokens standard is the Cryptokitties game which is basically a game developed on the blockchain which allows users to sell, buy and breed virtual cats.
    • Some other examples include Ethermon, MyCrypto, Cryptodoggies, etc. The assets bought with a non-fungible token are unique and only belong to the owner. It can’t be traded. It’s like a property that one owns (a house).
    • The ERC-721 standard tokens are created the same way as other kinds of tokens and can be created as many as the user wishes but the only difference is that the tokens have a unique value and unique metadata, making it non-fungible.

    It have the following functions:

    • name()
    • symbol()
    • tokenURI()
    • onERC721Received()
    • totalSupply()
    • balanceOf()
    • ownerOf()
    • safeTransferFrom()
    • transferFrom()
    • approve()
    • setApprovalForAll()
    • getApproved()
    • isApprovedForAll()
    • takeOwnership()
    • tokenMetadata()
    • tokenByIndex()
    • tokenOfOwnerByIndex()
    • supportsInterface()

    Characteristics of ERC-721 Tokens:

    1. ERC-721 tokens are the standards for non-fungible tokens (NFTs).
    2. These tokens cannot be exchanged for anything of equal value since they are unique in themselves, representing a unique asset.
    3. Each NFT token is linked to different owners and has its own tokenID or metadata that makes them unique.
    4. The most popular application areas of ERC-721 tokens are NFTs in gaming ( such as cryptokitties).

    Who Invented ERC-721?

    The initial ERC-721 specification was proposed by Dieter Shirley as an Ethereum Improvement Proposal (EIP), which is a process for introducing new standards to Ethereum, in January 2018.

    • ERC-721 was Ethereum’s first NFT token standard.
    • It laid the groundwork for the uses of NTFs we see today

    What’s So Special About ERC-721?

    The non-fungible nature of the ERC-721 token makes it special. The fact that ERC-721 is unique, makes it so special. The ERC-721 standard allows creators to issue unique crypto assets like NFTs via smart contracts.

    • All the ERC-721 tokens hold a different value.
    • The ERC-721 standard tokens are created the same way as other kinds of tokens and can be created as many as the user wishes but the only difference is that the tokens have a unique value and unique metadata.
    • It provides many functionalities such as transferring tokens from one account to another, obtaining the current token balance of an account, the owner of a specific token, and also finding out the total supply of the token available on the network.
    • ERC-721 is a more complex standard than other token standards, with multiple optional extensions.
    • In addition, it is split across a number of contracts.

    How are ERC-721 NFTs Produced?

    Tokens are created by smart contracts which is not only responsible for creating tokens but also for handling transactions and keeping track of balances. To get some tokens, you have to send some Ether (Cryptocurrency that lives in Ethereum) to the Smart contract which will then give you some tokens.

    • An ERC-721 token is created by writing a piece of code in a smart contract programming language like Solidity that follows the same basic template or base code.
    • Extra functionalities can also be programmed on the NFT by the user.

    What is ERC721 Token? - GeeksforGeeks (1)

    Workflow of Smart Contract

    • ERC-721’s main challenge is that transferring numerous assets can become expensive.

    What Can You Do With ERC-721 NFTs?

    They can be used to represent both tangible and intangible items.

    • Music NFTs: Music NFTs have also become popular in a short amount of time. On platforms such as Audius, it is very easy for creators to mint their work with these tokens.
    • NFT in event ticketing: From art to gaming to music, the NFTs have a lot more used cases. One novel NFT use case which is already being explored is events ticketing, while music venues, cinemas, theaters, and festivals sell a lot of tickets at the door, the largest ones often have to deal with monopolies.
    • Venue and musician collaboration: It is possible that in the near future venues and musicians could collaborate on unique NFTs that both grant admission to the show but also give concert-goers perks and extras like exclusive artwork or access to other merchandise. In such an arrangement, venues and artists could keep more money and exert more control over the ticketing process.
    • NFT Banking: NFTs can be investment assets that can be treated and sold earning their creator’s residuals over time, but NFTs can also be used as another type of investment.
    • NFT in the healthcare industry: Even the healthcare industry could use NFT. Some blockchain-based companies are working on allowing patients to pack in their medical data in smart contracts which can be easily and securely forwarded to medical professors. NFT could also be used by people to monitor their health information. Take DNA testing companies for example. They offered to track the genetic history of customers and then use their information however they please in perpetuity with NFTs. DNA testing companies will have to pay customers when they end up selling their data to other companies and customers would be able to easily track those transactions.

    Popular NFTs

    • Etherscan NFT Tracker
    • CryptoKitties game
    • Sorare is a football fantasy game
    • The Ethereum Name Service (ENS)
    • POAP
    • Unstoppable Domains
    • Gods Unchained Cards
    • Bored Ape Yacht Club

    Example of ERC-721 Token:

    Solidity

    // SPDX-License-Identifier: GPL-3.0

    pragma solidity >=0.8.6 <0.9.0;

    import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

    import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";

    import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";

    import "@openzeppelin/contracts/access/Ownable.sol";

    import "@openzeppelin/contracts/utils/Counters.sol";

    /// @title A contract for demonstrate ERC-721 Token

    /// @author Jitendra Kumar

    /// @notice For now, this contract just show how to create an ERC-721 Token

    contract GFGToken is ERC721, ERC721Enumerable, ERC721URIStorage, Ownable {

    using Counters for Counters.Counter;

    Counters.Counter private _tokenCountCounter;

    //set the NFT name and symbol

    constructor() ERC721("GFGToken", "GFG") {}

    //mint the NFT using Owner Address

    function safeMint(string memory _uri) public onlyOwner {

    uint256 tokenCount = _tokenCountCounter.current();

    _tokenCountCounter.increment();

    _safeMint(msg.sender, tokenCount);

    _setTokenURI(tokenCount, _uri);

    }

    function _beforeTokenTransfer(address from, address to, uint256 tokenCount, uint256 batchSize)

    internal

    override(ERC721, ERC721Enumerable)

    {

    super._beforeTokenTransfer(from, to, tokenCount, batchSize);

    }

    function _burn(uint256 tokenCount) internal override(ERC721, ERC721URIStorage) {

    super._burn(tokenCount);

    }

    function tokenURI(uint256 tokenCount) public view override(ERC721, ERC721URIStorage) returns (string memory)

    {

    return super.tokenURI(tokenCount);

    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable)returns (bool)

    {

    return super.supportsInterface(interfaceId);

    }

    }



    Like Article

    Suggest improvement

    Next

    What is a Cryptographic Token?

    Share your thoughts in the comments

    Please Login to comment...

    Similar Reads

    ERC20 vs ERC721 in Ethereum What is a Cryptographic Token? How to Send ERC20 Token with Web3.js? What is Metaverse Coin and Metaverse Token? Fetch.AI invests $100 million in AI Blockchain Tech, Introduces Rewards for Token Holders
    Z

    zehraina

    Article Tags :

    • Ethereum
    • Blockchain

    We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy

    What is ERC721 Token? - GeeksforGeeks (2)

    What is ERC721 Token? - GeeksforGeeks (2024)

    FAQs

    What is ERC721 Token? - GeeksforGeeks? ›

    ERC-721 is a standard for “non-fungible” tokens. A non-fungible token is the type of token that is unique. These are cryptographic assets on a blockchain that has a unique code and metadata differentiating them from one another.

    What is the ERC721 token? ›

    ERC-721 is a non-fungible token standard on the Ethereum blockchain. It provides a set of guidelines for creating unique tokens that represent digital assets. These tokens are non-fungible, meaning that they cannot be exchanged on a one-to-one basis due to their unique properties.

    What is the difference between ERC20 and ERC-721 tokens? ›

    The key difference between ERC20 and ERC721 tokens lies in their fungibility. ERC20 tokens are fungible and represent a uniform asset, while ERC721 tokens are non-fungible and symbolize a set of unique assets. Additionally, ERC721 tokens cannot be divided into smaller units.

    What is an example of ERC-721? ›

    The ERC-721 token smart contract demonstrates how to create and transfer non-fungible tokens. Non-fungible tokens represent ownership over digital or physical assets. Example assets are artworks, houses, tickets, etc. Non-fungible tokens are distinguishable and we can track the ownership of each one separately.

    What is the difference between erc1155 and ERC-721? ›

    ERC-721 is a non-fungible token that represents unique assets such as virtual real estate, collectibles, and rare items, whereas ERC-1155 is a multi-fungible token that can be used to represent multiple assets in a single token.

    What are the benefits of ERC-721? ›

    ERC-721 tokens provide a secure and transparent way to prove ownership of unique assets. Their flexibility allows creators to add extra features. They work seamlessly on various platforms, ensuring transparent and protected digital ownership, and this sets the stage for innovative applications.

    How to create an ERC721 token? ›

    How to create an ERC721 token with OpenZeppelin
    1. Let's get started. Go to the OpenZeppelin Contracts Wizard and click on ERC721. ...
    2. Let's add some features. ...
    3. Let's set the access control. ...
    4. Let's add upgradeability. ...
    5. Let's add a security contact. ...
    6. Download your smart contract code. ...
    7. Compile the smart contract. ...
    8. Deploy the smart contract.
    Mar 24, 2023

    What are the disadvantages of ERC-721? ›

    Cons of ERC-721 Tokens

    The lack of fungibility can make ERC-721 tokens less suitable for certain financial transactions. High gas fees and network congestion can limit the efficiency of ERC-721 transactions. Ensuring the authenticity of NFTs is a challenge.

    What is the most popular ERC token standard? ›

    Erc-20 is the most widely-used token standard, and it defines a set of rules for creating fungible tokens (tokens that are interchangeable with each other) on the ethereum network.

    What does ERC token stand for? ›

    Key Takeaways

    An ERC20 token is a standard for creating and issuing smart contracts on the Ethereum blockchain. ERC stands for "Ethereum Request for Comment," and the ERC20 standard was implemented in 2015.

    What is ERC-721 format? ›

    ERC721 is a standard for representing ownership of non-fungible tokens, that is, where each token is unique. ERC721 is a more complex standard than ERC20, with multiple optional extensions, and is split accross a number of contracts.

    What does ERC stand for? ›

    The Employee Retention Credit (ERC) – sometimes called the Employee Retention Tax Credit or ERTC – is a refundable tax credit for certain eligible businesses and tax-exempt organizations.

    Is ERC-721 free? ›

    ERC-721 is a free, open standard that describes how to build non-fungible or unique tokens on the Ethereum blockchain. While most tokens are fungible (every token is the same as every other token), ERC-721 tokens are all unique.

    How do I know if my contract is ERC721 or ERC1155? ›

    According to EIPs, ERC721 and ERC1155 will implements EIP165. Therefore, we can use the supportsInterface of EIP165 to check whether the contract is ERC721 or ERC1155. The interface id for ERC1155 is 0xd9b67a26 , while the interface of ERC721 is 0x80ac58cd .

    What is the difference between ERC20 and ERC721 tokens? ›

    ERC20 tokens are fungible, meaning that each token is identical and interchangeable with another token of the same type. This fungibility facilitates secure exchange and on cryptocurrency exchanges. In contrast, ERC721 tokens are non-fungible, with each token representing a unique digital asset.

    Can ERC721 be fractionalized? ›

    By definition, an ERC721 cannot be replicated as each token is completely unique. In order to fractionalize an NFT, a smart contract can be designed to generate a series of ERC20 tokens which are then linked to the specific ERC721 token.

    What is ERC-721 token code? ›

    ERC-721 tokens are the standards for non-fungible tokens (NFTs). These tokens cannot be exchanged for anything of equal value since they are unique in themselves, representing a unique asset. Each NFT token is linked to different owners and has its own tokenID or metadata that makes them unique.

    What is ERC 777 token? ›

    ERC-777 - a token standard for producing fungible tokens on the Ethereum network, which allows a novel token contract interaction method that is backward compatible.

    How do I know if my contract is ERC-721 or ERC1155? ›

    According to EIPs, ERC721 and ERC1155 will implements EIP165. Therefore, we can use the supportsInterface of EIP165 to check whether the contract is ERC721 or ERC1155. The interface id for ERC1155 is 0xd9b67a26 , while the interface of ERC721 is 0x80ac58cd .

    What is the use of ERC token? ›

    An ERC20 token is a standard for creating and issuing smart contracts on the Ethereum blockchain. ERC stands for "Ethereum Request for Comment," and the ERC20 standard was implemented in 2015.

    Top Articles
    How to Sell Bitcoin For Gold (Updated For 2024)
    Adjustable Rate Mortgage: How an ARM Works, Who It’s For - NerdWallet
    Dainty Rascal Io
    Celebrity Extra
    Nwi Police Blotter
    Tv Guide Bay Area No Cable
    10 Popular Hair Growth Products Made With Dermatologist-Approved Ingredients to Shop at Amazon
    Videos De Mexicanas Calientes
    Paketshops | PAKET.net
    Ohiohealth Esource Employee Login
    Large storage units
    Https //Advanceautoparts.4Myrebate.com
    Immediate Action Pathfinder
    Superhot Unblocked Games
    Craigslist Pets Longview Tx
    The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
    Mzinchaleft
    Tygodnik Polityka - Polityka.pl
    Effingham Bookings Florence Sc
    Mahpeople Com Login
    How to Watch the Fifty Shades Trilogy and Rom-Coms
    EASYfelt Plafondeiland
    Dwc Qme Database
    Great Clips Grandview Station Marion Reviews
    Putin advierte que si se permite a Ucrania usar misiles de largo alcance, los países de la OTAN estarán en guerra con Rusia - BBC News Mundo
    Mtr-18W120S150-Ul
    Haunted Mansion Showtimes Near Epic Theatres Of West Volusia
    Rogue Lineage Uber Titles
    Dei Ebill
    Synergy Grand Rapids Public Schools
    Is Henry Dicarlo Leaving Ktla
    Alternatieven - Acteamo - WebCatalog
    Deleted app while troubleshooting recent outage, can I get my devices back?
    Xemu Vs Cxbx
    Best Weapons For Psyker Darktide
    KITCHENAID Tilt-Head Stand Mixer Set 4.8L (Blue) + Balmuda The Pot (White) 5KSM175PSEIC | 31.33% Off | Central Online
    Sabrina Scharf Net Worth
    Hireright Applicant Center Login
    3 bis 4 Saison-Schlafsack - hier online kaufen bei Outwell
    Wilson Tire And Auto Service Gambrills Photos
    Memberweb Bw
    Tommy Bahama Restaurant Bar & Store The Woodlands Menu
    Lyons Hr Prism Login
    Booknet.com Contract Marriage 2
    Sacramentocraiglist
    Bonecrusher Upgrade Rs3
    Lebron James Name Soundalikes
    Is Chanel West Coast Pregnant Due Date
    Skyward Login Wylie Isd
    Powah: Automating the Energizing Orb - EnigmaticaModpacks/Enigmatica6 GitHub Wiki
    How to Find Mugshots: 11 Steps (with Pictures) - wikiHow
    Att Corporate Store Location
    Latest Posts
    Article information

    Author: Mr. See Jast

    Last Updated:

    Views: 6431

    Rating: 4.4 / 5 (55 voted)

    Reviews: 94% of readers found this page helpful

    Author information

    Name: Mr. See Jast

    Birthday: 1999-07-30

    Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

    Phone: +5023589614038

    Job: Chief Executive

    Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

    Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.