Skip to content

karadikid/3-Make-NFTs-On-Chain-Metadata

Repository files navigation

Making NFTs with On Chain Metadata

This project shows how to create NFTs with on chain metadata for use in an onChain gaming dApp.

Requirements

  1. Metamask Private Key, Alchemy free account, Polygon Scan Mumbai Api Key.
  2. Web3 compatible browser (Brave suggested)
  3. Metamask
  4. Polygon Network Mumbai Testnet Matic Token
  5. Hardhat
npm install hardhat --save-dev)
  1. Packages: OpenZeppelin contracts, hardhat-etherscan, dotenv
npm install @openzeppelin/contracts @nomiclabs/hardhat-etherscan dotenv
  1. Be sure to populate .env in root project directory with TESTNET_URL, POLYGONSCAN_API_KEY, and PRIVATE_KEY
  2. Compile code from repository directory
npx hardhat compile
  1. Deploy code to Polygon Mumbai and save contract address returned
npx hardhat run scripts/deploy.js --network mumbai
  1. Verify contract code on Polygon Scan Mumbai, returns URL https://mumbai.polygonscan.com/address/0xb3142AD7D5D53E155d37eA87409a4A6aA215D6Bb#code (My contract code)
npx hardhat --verify <CONTACT ADDRESS FROM #8> --network mumbai
  1. Interact with contract in Polygon Scan, Mint.
  2. Verify on OpenSea NFT First Mint Screenshot
  3. Level up by executing train on Polygon Scan with '1' as the value (We only minted one NFT)
  4. Verify on OpenSea NFT Train

Struct Reference Pseudo Random Functions - Danger - Deterministic

About

Making NFTs with On Chain Metadataa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published