2/ Second, if you want to find out which token standard an NFT on OpenSea uses, just follow this video.
3/ Alright, now let's jump into ERC1155.
The main difference between ERC1155 and ERC721 is that ERC1155 can represent both fungible AND non-fungible tokens.
4/ I explained before how each ERC20 token has its own contract, and how each collection of ERC721 NFTs has its own contract.
You can think of an ERC1155 contract as a mashup of those two—a single contract keeps track of how many fungible and non-fungible tokens people own.
5/ How does this work?
An ERC20 contract stores a mapping from addresses to balances.
An ERC721 contract stores a mapping from token IDs to owners.
An ERC1155 contract stores a mapping from token IDs to another mapping—a mapping from addresses to balances.
6/ For example, an ERC1155 contract's mapping might look like this:
0 => (0x123 => 5, 0x234 => 10)
1 => (0x123 => 1)
0 is the token ID for a fungible token—multiple people can own it.
1 is the token ID for an NFT—only one person owns it.
7/ Why would anyone want to do this? There are two main reasons.
8/ The first reason:
If a project requires multiple token types (e.g. a game), it's cheaper to deploy one ERC1155 contract instead of multiple ERC20/ERC721 contracts.
9/ The second reason:
ERC1155 supports batch transfers. E.g. I can transfer token 1 and token 2 to you in just one transaction. That saves gas, and reduces costs for the end-user.
10/ Note that most NFT collections, like @BoredApeYC, @foxfamnft, and @Pudgy_Penguins use ERC721, because they have no need to support fungible tokens.
11/ That's it! If you have any questions, reach out. And check out @OpenZeppelin for more details on this subject.
2/ Anchor (by @ProjectSerum) is a framework that will make your life much easier.
There are three parts to Anchor:
- A TypeScript library that's similar to web3.js
- Rust crates that make writing Solana programs easier
- A CLI for building/testing, similar to @HardhatHQ
My 7 favorite resources for getting started with web3...
1/ @3blue1brown's video "But how does bitcoin actually work?" explains Bitcoin's blockchain, and is the most understandable introduction to blockchain I've come across.
2/ The @ethereum whitepaper explains what Ethereum is and how it works. I recommend skimming it to get the general idea and revisiting it later.