A sample web3 application that allows to create the 3 types of NFT.
contracts/BasicNFT.sol
Allows to MINT a basic NFT which is already hosted on IPFS. It has Token URI and Images associated with it.
contracts/RandomIpfsNft.sol
Allows to MINT a random NFT from a set of 3 NFT token. It also set rarity for each NFT and will programmatically upload it to IPFS using pinata service.
contracts/DynamicSvgNft.sol
Allows to MINT a SVG NFT that are hosted on-chain. We have two NFTes and based on minting cost we assign NFT to the minter. Using some advance solidity method and Base64 we encode our SVG file, add metadata and upload it to our blockchain.
The deploy scripts are inside the deploy
folder. We also have used Chainlink VRF for generating Random NFT. Tests are inside test
folder.
This web3 application is developed using Hardhat
and TypeScript
while following Patrick Collins course.
To run and test the code in your local development machine copy the repository with the following command. We have used yarn
package manager to install all dependencies. You can use NPM
.
git clone https://github.com/sanjaydefidev/hardhat-nft
Installing all the dependencies
yarn install
Check out this link for more information about this tutorial.
Thanks to @PatrickAlphaC for creating such a helpful tutorial.