In this post we're going to learn the ERC-721 and the ERC-1155 token standards both of these token standards are for creating non-fungible tokens also known as NFTs.
For those of you who don't know NFTs are simply ways in which we can show digital ownership of unique or rarer assets on a blockchain. Starting with ERC721 is Etheruem Request for Comments 721, which is Etheruem Improvement Proposal proposed by Direly Shirley in 2017.
An ERC-721 allows us to create assets that are totally unique and clearly show who has ownership of that asset, for example, if i was an artist i could turn one of my paintings into a digital asset and freely sell it on an open marketplace then thanks to the properties of the ERC-721 and the ethereum blockchain, we're able to clearly see when this asset was created who created it who owns it now and what price they paid for it this is a powerful standard because the information is immutable and can't be tampered with which means that it is easy to verify who owns an asset and it is easy to determine if someone has made a fake copy of your asset.
Example of Item Activity for BAYC #7894
ERC-721 also defines a minimum interface a smart contract must implement to allow unique tokens to be managed, owned, and traded. Smart Contracts are written mostly in Solidity, Rust, and Go. We will be talking more from a Solidity perspective side. A Smart Contract for ERC 721 has the following functions name
, balanceOf
, ownerOf
, approve
, safeTransferFrom
, transferFrom
, setApproveForAll
, getApproved
, and isApprovedForAll
and events like Transfer
, Approval
, ApprovalForAll
.
An ERC-1155 is similar to the ERC-721 because they both have the ability to create digital assets that are totally unique however unlike the ERC-721, the ERC-1155 also has the ability to create digital assets that are not unique for example if we wanted to create a card trading game where we had 10 copies of a card and the goal was to collect all 10 copies we can easily do this with an ERC-1155 but this is the confusing part for a lot of people because now that we can have copies of an NFT it is technically no longer unique, non-unique assets are not actually a bad thing. ERC-1155 are gaining popularity when creating assets for virtual worlds or games because typically you might not want every sword in a game to be unique you probably want two or three types of swords but then hundreds or even thousands of copies of those swords although ERC-721 are currently the more widely adopted standard. I think that ERC-1155 will eventually take over as gaming and virtual worlds grow in popularity.
Example of Hell Sword NFT copies
That's it for this post see you later in another post.