A Next.js marketplace app that uses the Web3 and IPFS APIs of Infura to mint, buy and sell NFTs.
You will need an Infura account with the following product keys:
- Web3 API
- IPFS
Make a copy of the example environment variables file and name it .env.local
cp .env.example .env.localPopulate the environment variables with the values shown in your Infura account.
Install dependencies with:
yarn installStart a local Hardhat node with:
yarn start:hardhatDeploy the 2 smart contracts to the local node with:
yarn deploy:hardhatThis command will also write the contract addresses to a file at
./config.jswhere they can be consumed by the app.
Start the development server:
yarn devOpen http://localhost:3000 with your browser to see the marketplace app.
This app uses 2 smart contracts:
MBMarket.sol- fetching NFTs, keeping track of sold/unsold NFTs, creating sales (buying transactions)NFT.sol- for storing URIs and minting tokens

