Skip to content

EatTheBlocks/polygon-development

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFT's strength

Use Chainlink VRF to get a random strength for each NFT as it is minted.

Quick Start

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:

image

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 the debug contracts tab:

image

Wait for the randomResult to get set:

image

Finally, mint from the gallery tab and your NFT will have a tokenStrength:

image


Try to "Mint" an NFT:

image

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:

image

Send an NFT to the incognito window just to make sure it works.

Deploy NFT smart contract!

Change the defaultNetwork in packages/hardhat/hardhat.config.js to mumbai

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 in packages/react-app/src to change the targetNetwork to mumbai

You should see the correct network in the frontend:

Ship the app!

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

Original Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published