In this free multi-part fullstack tutorial on YouTube you learn how to build a NFT Marketplace with or without Lazy minting.
#0 – Get the NFT Marketplace Source Code here
#1 – Live Demo and Technologies
In this YouTube video we show you a short live demo of the NFT Marketplace with Lazy Minting and an overview of the technologies we are using to build it.
Are you wondering what’s Lazy Minting and why you actually would need it? Well, it’s an approach to mint and sell NFTs with literally no gas fees for the NFT creator or seller.
#2 – Frontend with Nextjs, React and Tailwind
In this video we will show you how to build the frontend for a NFT Marketplace with Next.js, React and Tailwind.
#3 – Ethereum Connection Layer
This is the third episode of a multi-part NFT Marketplace fullstack tutorial. In this video we build the Ethereum Connection Layer of the NFT Marketplace. First we install Hardhat and spin up a local etherum node in our development environment. Then we connect Metamask to this local ethereum node. We proceed with developing an ethereum interface modul, that enables us to connect from the client side with client wallets like Metamask but also from the server side through our Next.js backend APIs that we are going to build in the following videos. As a bonus track we build a workaround for a known Metamask bug “unchecked runtime.lasterror: could not establish connection”.
#4 – Backend APIs and Service Layer
This is the fourth episode of our multi-part NFT Marketplace fullstack tutorial. In this video we create the Backend APIs and also the Service Layer of the NFT marketplace. First we start with creating a Backend API that later on allows us to retrieve the lazy-minted NFTs from the database. Then we create a backend API that will enable us to upload new NFTs. Furthermore we will build a Service Layer, that on one hand allows our marketplace to easily interact with the Backend APIs and on the other hand it allows our backend APIs to consume other internal and external services.
#5 – IPFS and Database Layer
In this episode we explain why we create Backend APIs to interact with IPFS and why we store NFTs in a database. You learn how to store the NFT images and its metadata on IPFS through the Infura gateway and how to store NFTs along with offchain data in a MongoDB database. Furthermore we show you how to run a MongoDB database with Docker on the Google Cloud Platform (GCP).
#6 – Smart Contracts and Inheritence
In this episode we build an abstract NFT contract with permission roles and derive our tutorial NFT Collection from this abstract NFT contract. We start with a short explanation on how to write smart contracts with Solidity based on an example smart contract that comes with Hardhat. You will also learn what ABIs are and why we need it. Then we use Open Zeppelin to build the abstract NFT contract with permission roles and we show you how to derive from this smart contract by creating the Tutorial NFT collection – the Bored Ape Fake Club (BAFC). We implement the interfaceNFT module in this video, that allows our marketplace frontend to interact with NFT contracts through their ABI. The marketplace smart contract, that we will build in the following videos, will interact with this NFT smart contract to mint and transfer NFT tokens.
#7 – Lazy Minting and EIP-712
In the seventh episode we define the structure of lazy minted NFT sales orders and we implement a domain separator to protect us against replay attacks with different chain ids. Then we write code that enables nft creators and sellers to sign their sales orders. We also code the marketplace smart contract that verifies and recovers the signatures of these lazy minted sales orders and that performs several security checks before it mints the NFT token on the blockchain or transfers the NFT token to the buyer. Eventually we will invalidate the lazy minted sales orders directly on the blockchain once they were used.
#8 – Get the Source Code (Surprise!) and install it
In this episode we exactly show you how to get the source code of this NFT Marketplace with Lazy Minting – Fullstack Tutorial and how to install and run it. Watch this video until the end then you might be in for a pleasant surprise!
You can get the source code here (payable).
#9 – Monetization and Revenue Distribution
In this episode we show you how to monetize your NFT marketplace. In an NFT marketplace there are several particpants who can earn their fair share – the NFT Creator, the NFT Seller and the NFT Marketplace. In this video we just implement a very simple earnings distribution between the seller of an NFT and the marketplace and we show you how we use integer operations in the Marketplace Smart Contract to overcome the technical restrictions with decimals in solidity.
#10 – Royalties and EIP-2981
In this video we implement Royalty payments to the creators of the NFTs. The NFT creators will receive a creator share, which is a fraction of the sales price, whenever their NFT Token is sold. For this purpose we will extend the revenue distribution that we implemented in the 9th video. In order to support Royalty payments for secondary sales across different marketplaces we implement the EIP-2981 standard, which is a standardized way to retrieve royalty payment information.
Have fun watching and don’t miss out on any episode by subscribing to our YouTube Channel