Welcome to the LW3Punks NFT Dapp! This dapp allows you to mint unique LW3Punks NFTs on the Polygon Mumbai testnet. Here's how you can get started:
-
Sign up for Pinata to upload and pin your NFT images and metadata on IPFS.
-
Download the LW3Punks folder to your computer and upload it to Pinata, naming the folder "LW3Punks".
-
Note the CID (Content Identifier) generated for your folder.
-
To check if your folder is on IPFS, use this URL: https://ipfs.io/ipfs/your-nft-folder-cid, replacing "your-nft-folder-cid" with the CID you received from Pinata.
-
Upload metadata files for each NFT as JSON files. Example metadata structure is provided in the project.
-
Name the folder containing metadata files "metadata" and upload it to Pinata.
-
Note the CID generated for your metadata folder.
-
To check if your metadata folder is on IPFS, use this URL: https://ipfs.io/ipfs/your-metadata-folder-cid, replacing "your-metadata-folder-cid" with the CID you received from Pinata.
-
Set up a Hardhat project by following the commands in the project description.
-
Create a new file named "LW3Punks.sol" in the
NFT-IPFS/backend/contracts
directory and paste the provided smart contract code. -
Set up your environment variables by creating a
.env
file in theNFT-IPFS/backend
folder, as described in the project description. -
Compile the contract using
npx hardhat compile
. -
Deploy the contract to the Mumbai network using
npx hardhat run scripts/deploy.js --network mumbai
. -
Note the LW3Punks contract address provided in the terminal.
-
Create a new Next.js app in the
frontend
folder usingnpx create-next-app@latest
. -
Run the app with
cd frontend
andnpm run dev
. -
Install the required libraries (Web3Modal and ethers.js) using
npm install web3modal
andnpm i ethers@5
. -
Add your NFT contract address and ABI to the
constants/index.js
file. -
Customize the website by replacing the content in the
pages/index.js
file and updating the CSS instyles/Home.module.css
. -
Run the website locally using
npm run dev
to test it.
-
Sign in to Vercel with your GitHub account.
-
Create a new project, select your IPFS-Practical repo, and configure it.
-
Set the Root Directory to "my-app" and select "Next.js" as the framework.
-
Click "Deploy" to deploy your dapp.
-
Your deployed website's domain will be available in your Vercel dashboard.
Now, your LW3Punks NFT Dapp is live and ready to be used! Share the domain with your friends and start minting unique LW3Punks NFTs on the Polygon Mumbai testnet. Have fun! ๐