- This is a smart contract that give graduates a diploma of schools (such as college, university, etc) which is published as a
NFT
with arandom number (randomness)
generated byChainlink-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.
- 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...
- ① Add
.env
file to the root directory. (Please.env.example
for creating.env
file)
- ② Install modules
yarn
- 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"
- DiplomaNFTFactory.sol:
yarn script-kovan:GraduatesRegistry
- Deploy 2 smart contracts on Kovan testnet
- DiplomaNFTFactory.sol
- GraduatesRegistry.sol
yarn script-kovan:Deploy
- This is the demo video that show executing the script file (which include whole scenario) above.
https://youtu.be/pnKU3xVnjcw
- Chainlink VRF:
- Example Repo:
- Chainlink Hardhat Box (hardhat-starter-kit): https://github.com/smartcontractkit/hardhat-starter-kit
- Articles:
-
How to Build Dynamic NFTs on Polygon:
https://blog.chain.link/how-to-build-dynamic-nfts-on-polygon/ -
16 Ways to Create Dynamic Non-Fungible Tokens (NFT) Using Chainlink Oracles:
https://blog.chain.link/create-dynamic-nfts-using-chainlink-oracles/
-