Buy Crypto
Markets
Contract
Spot
Earn
Web3 new
Learn
Academy > DeFi > What are ERC-721 and ERC-1155: Standards for Creating NFTs >

What are ERC-721 and ERC-1155: Standards for Creating NFTs

2021-09-16 06:16:17

Summary

  • The ERC-721 non-fungible token standard is written in Solidity language on the Ethereum blockchain and it allows developers to tokenize ownership of any arbitrary data.
  • ERC-1155, an improved standard beyond ERC-721, is another token standard on the Ethereum blockchain that facilitates the creation of both kinds of tokens, fungible and non-fungible. The goal is to create a smart contract interface that can represent both types.

One way to represent the cost of exchanging value on a blockchain network is through asset tokenization, of which the assets can either be fungible or non-fungible. Fungible means they can be divided and exchanged for another. Non-fungible tokens (NFTs), on the other hand, cannot be divided and there are no existing duplicates. On a blockchain like Ethereum, two popular standards for creating NFTs exist, ERC-721 and ERC-1155.

erc 721 vs erc 1155

What is The ERC-721?

ERC-721 is a non-fungible token (NFT) standard written in Solidity language on the Ethereum blockchain. It allows developers to tokenize ownership of any arbitrary data. In particular, the standard aims to create interchangeable tokens.  ERC-721 standard was created by William Entriken, Dieter Shirley, Jacob Evans, and Natassia Sachs in 2018. An example of an ERC 721 contract is from OpenZeppelin, which allows developers to track items in their game.

ERC 721 token code
ERC-721 token code

Essentially, each ERC 721 token is unique and represents a single asset. Moreover, it allows developers to build a whole new ecosystem of tokens on the Ethereum blockchain.

Characteristics of ERC-721 Tokens

The ERC-721 standard structurally resembles the ever-famous ERC-20 token architect. Although the smart contracts of both tokens have somewhat similar functions, some features of ERC-721 are different.

Here are the most prominent features of ERC-721:

  1. Token name: Each ERC-721 token has a name field, which indicates the token name to external applications or contracts.
  2. Ownership: ERC-721 standard has a defined field of functions that defines the ownership of the underlying token and gives directions on how to transfer that ownership.
  3. Token tracking: ERC-721 standard has a field called “tokenOfOwnerByIndex” that allows developers to track tokens through a unique ID.

What is The ERC-1155?

ERC-1155, an improved standard beyond ERC-721, is another token standard on the Ethereum blockchain that facilitates the creation of both kinds of tokens, fungible and non-fungible. The goal is to create a smart contract interface that can represent both types. Here is the ERC-1155 token code from OpenZipplin that helps track multiple items in a game.

ERC-1155 token code
ERC-1155 token code

The ERC-1155 standard, in particular, has the same functionality as an ERC-721 and ERC-20 token. However, it improves upon the functionality of both standards and is a more efficient standard overall. In terms of benefits, transactions using the ERC-1155 standard can be bundled together to help reduce the cost of trading tokens.

Benefits of ERC-1155 Tokens

ERC-1155 standard stands out because of the following characteristics:

  • Effective Transfer: The ERC-1155 standard allows users to make massive transfers natively of the tokens within a smart contract. For example, in a smart contract with a series of fungible or non-fungible tokens, a developer can choose to transfer multiple tokens in the same operation. It not only reduces the transaction cost but also minimizes the impact on the network.
  • Multiple Tokens in A Single Contract: Each ERC-1155 token describes the existence and operation of both the fungible and non-fungible token types. For example, while an ERC-1155 can create one or more NFTs, it can also describe fungible tokens – all within the same contract.
  • Secure Transfer of Tokens: ERC-1155 token standard includes a function that checks whether a transaction is valid or not. If a transaction doesn’t go through, this function returns the token to the issuer. It helps when users accidentally make a mistake in the transcription or send out tokens to the wrong address. The code can automatically revert the transaction.
get free crypto by just watching videos

ERC-721 vs ERC-1155: The Key Differences

1 Smart Contract

First, the ERC-721 standard produces NFTs solely and forces developers to create a smart contract for each new token. On the other hand, ERC-1155 allows developers to develop a single smart contract that can be used to mint either fungible tokens or NFTs.

2 Efficiency

Since ERC-721 allows a single operation for each transaction, it is expensive and time-consuming. At the same time, it reduces the effectiveness of the blockchain network with redundant code. Whereas, ERC-1155 allows multiple operations in a single transaction. Therefore, the transactions are cheaper and more efficient. Plus, unlike ERC-721, which utilizes significant space, ERC-1155 uses less storage space on a blockchain network.

Get 180 welcome bonus at Phemex

Which Is Better, ERC-721 or ERC-1155?

Both the token standards can mint NFTs. It leaves us with the question: which one should you prefer? It all depends upon your personal preference or the use case. While some art collectors only buy ERC-721 NFTs because they see this token type as the gold standard, other collectors do not have any specific preference. On the flip side, ERC-1155 is cheaper and efficient as it reduces the gas fees, making it an affordable and approachable way to mint an NFT.


For any inquiries contact us at support@phemex.zendesk.com
Follow our official Twitter | Join our community on Telegram
Trade crypto on the go: Download for iOS | Download for Android
Phemex | Break Through, Break Free
giftRegister to get $180 Welcome Bonus!
Email
Password
Invitation code (Optional)
  • Facebook
  • Twitter
  • LinkedIn
  • Telegram
  • Discord
  • Youtube
Subscribe Phemex

Register on Phemex and begin your crypto journey today

Get $180 to Sign Up