ERC-20, ERC-721, and ERC-1155 are token standards used for deploying smart contracts on a blockchain.
ERC-20 defines cryptocurrency and treats all assets as completely interchangeable (or fungible). Fungible tokens are like fiat currencies that are not unique and divisible with another token of the same kind. For instance, 1 bitcoin can be bought in small fractions such as 0.00000002 BTC and still comprise the same 1 bitcoin.
ERC-721 allows for the creation of non-fungible tokens (NFTs). Many assets that you can face in web3 games are ERC-721: for example, on-of-a-kind heroes, that can’t be replicated.
In addition to being completely unique, here are some of the additional feature specifications of ERC-721:
- It allows you to transfer NFTs between accounts, allowing NFTs to be traded for other currencies.
- It allows you to identify the total supply of a set of NFTs on the network.
- It allows you to query for the owners of a specific asset.
ERC-1155 is a middle ground between the ERC-20 standard and the ERC-721 standard. It supports the creation of semi-fungible tokens. Semi-fungible tokens often appear in web3 games as different kinds of gear or materials. For example, a sword may be issued in a finite number of copies, each of them giving identical powers. At the same time, its design is unique comparing to other kinds of gear in a game and such swords' owners manage their assets (sell, lend out, transfer, etc.) separately.