Use Chainlink VRF to get a random strength for each NFT as it is minted.
required: Node plus Yarn and Git
- Clone this repository
yarn install
yarn start
in a second terminal window:
yarn chain
Edit the artwork manifest
artwork.js
with all of your art, then upload it to IPFS:
in a third terminal window:
yarn upload
yarn deploy
Open http://localhost:3000 to see the app
Your artwork from artwork.json
(if uploaded and deployed correctly) should show a gallery of possible NFTS to mint:
Use the faucet wallet icon in the bottom left of the frontend to give your address $1000 in testnet MATIC.
This repo uses Chainlink's VRF on Mumbai.
First call
getRandomNumber()
from thedebug contracts
tab:
Wait for the
randomResult
to get set:
Finally, mint from the
gallery
tab and your NFT will have atokenStrength
:
Try to "Mint" an NFT:
Open an incognito window and navigate to http://localhost:3000 (You'll notice it has a new wallet address).
Grab some gas for each account using the faucet:
Send an NFT to the incognito window just to make sure it works.
Change the
defaultNetwork
inpackages/hardhat/hardhat.config.js
tomumbai
Generate a deploy account with yarn generate
View your deployer address using yarn account
(You'll need to fund this account. Hint: use an instant wallet to fund your account via QR code)
Thoroughly check your artwork.json
file and run:
yarn upload
Deploy your NFT smart contract:
yarn deploy
✏️ Edit your frontend
App.jsx
inpackages/react-app/src
to change thetargetNetwork
tomumbai
You should see the correct network in the frontend:
build and upload your frontend and share the url in the ETB's discord.
# build it:
yarn build
# upload it:
yarn surge
yarn s3
yarn ipfs