Marketplaces
Listing and transfers.
How NFT Marketplaces Work
An NFT marketplace lets users list tokens for sale and lets buyers purchase them. Behind the scenes it relies on the ERC-721 approval and transfer mechanics you have already learned.
The marketplace contract never owns your NFT - it just moves it when a sale executes.
The Approval Step
Before listing, the seller must approve the marketplace to move the token. Sellers usually call setApprovalForAll so one approval covers all their NFTs in a collection.
<code>// seller authorizes the marketplace
nft.setApprovalForAll(marketplaceAddress, true);</code>All lessons in this course
- The ERC-721 Standard
- Minting NFTs
- Token Metadata
- Marketplaces