masaun / diploma-NFTs-with-chainlink-VRF

Diploma-NFTs with Chainlink-VRF. This is a smart contract that give graduates a diploma of schools (such as college, university, etc) which is published as a NFT with a random number (randomness) generated by Chainlink-VRF (Verifiable Random Function)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Diploma-NFTs with Chainlink-VRF

【Overview】

  • This is a smart contract that give graduates a diploma of schools (such as college, university, etc) which is published as a NFT with a random number (randomness) generated by Chainlink-VRF (Verifiable Random Function)

  • By using that,
    • Schools (such as college, university, etc) can give graduates truly unique diploma.
    • Graduates can utilize their diploma as a proof for various opportunities.

【Workflow】

  • Diagram of workflow
    DiplomaNFT-by-using-Chainlink-VRF

【Tech Stack】

  • Solidity (Solc): v0.7.6
  • Hardhat: v2.6.4
  • ethers.js: v5.0.24
  • @chainlink/contracts: v0.2.2
  • Node.js: v16.7.0 etc...

【Setup (Installation)】

  • ① Add .env file to the root directory. (Please .env.example for creating .env file)

  • ② Install modules
yarn

【Script】

  • Execute the script file ( ./scripts/GraduatesRegistry.script.js ) that includes the whole scenario of this smart contracts.
    • [NOTE]: In advance, your executor address of this script must have more that 0.1 LINK for sending a request to Chainlink-VRF and some ETH for executing transactions
    • [NOTE]: At the moment, deployed-addresses on Kovan of 2 smart contracts below are used in the script file ( ./scripts/GraduatesRegistry.script.js ). If you want to attemp to new contract addresses on Kovan, please use the script for deployment ( https://github.com/masaun/diploma-NFTs-with-chainlink-VRF#deployment ).
      • DiplomaNFTFactory.sol: "0xE1538ee65808dC992c22fd656C4CFf08350BBb9F"
      • GraduatesRegistry.sol: "0xAcEa79FC1cF702C6A7F39823905d988E69784AD3"
yarn script-kovan:GraduatesRegistry

【Deployment】

  • Deploy 2 smart contracts on Kovan testnet
    • DiplomaNFTFactory.sol
    • GraduatesRegistry.sol
yarn script-kovan:Deploy

【Demo Video】


【References】



About

Diploma-NFTs with Chainlink-VRF. This is a smart contract that give graduates a diploma of schools (such as college, university, etc) which is published as a NFT with a random number (randomness) generated by Chainlink-VRF (Verifiable Random Function)

License:MIT License


Languages

Language:JavaScript 62.5%Language:Solidity 36.8%Language:Shell 0.6%