Mint trustful NFTs for your YouTube videos. Ownership is checked by an oracle that consumes YouTube's API and the terms licensed to the NFT owner are defined using semantic NFT metadata.
- YouTube Video NFTs with multiple editions for the same video identifier.
- Video ownership verification using a Chainlink oracle.
- Rich NFT metadata stating the terms licensed to the owner using semantic metadata and ontologies.
- Semantic metadata representation using JSON-LD but compatible with existing NFT marketplaces, so NFTs can be traded there.
- Frontend that facilitates user experience, including verifying that the YouTube video exists, fetching its title, or monitoring oracle verification events so the users get feedback through the whole minting process.
Based on Chainlink's Hardhat Starter Kit and React Moralis for the frontend.
Set your RINKEBY_RPC_URL
Set your MUMBAI_RPC_URL
You can set these in your .env
file. If you're unfamiliar with how setting environment variables work,
check out our .env example.
If you wish to use this method to set these variables, update the values in the .env.example file,
and then rename it to '.env'.
If you plan on deploying to a local Hardhat network that's a fork of the
Ethereum mainnet instead of a public test network, you'll also need to set your MAINNET_RPC_URL
environment variable
and uncomment the forking
section in hardhat.config.js
.
You can get one for free at Alchemy's site..
You can also use a PRIVATE_KEY
instead of a MNEMONIC
environment variable by uncommenting the section in the
hardhat.config.js
, and commenting out the MNEMONIC
line.
Then you can install all the dependencies.
git clone https://github.com/rogargon/YTVideoNFTknz/
cd YTVideoNFTknz
then
npm install
Or
yarn
This Starter Kit is configured by default to attempt to auto-fund any newly deployed contract that uses Any-API or Chainlink VRF, to save having to manually fund them after each deployment. The amount in LINK to send as part of this process can be modified in the Starter Kit Config, and are configurable per network.
Parameter | Description | Default Value |
---|---|---|
fundAmount | Amount of LINK to transfer when funding contracts | 1 LINK |
If you wish to deploy the smart contracts without performing the auto-funding, run the following command when doing your deployment:
npx hardhat deploy --tags main
Deployment scripts are in the deploy directory.
This will deploy to a local hardhat network:
npx hardhat deploy
To deploy to testnet:
npx hardhat deploy --network kovan
Tests are located in the test directory.
To run tests:
yarn test
You'll need an ETHERSCAN_API_KEY
environment variable.
You can get one from the Etherscan API site.
npx hardhat verify --network <NETWORK> <CONTRACT_ADDRESS> <CONSTRUCTOR_PARAMETERS>
example:
npx hardhat verify --network kovan 0x9279791897f112a41FfDa267ff7DbBC46b96c296 "0x9326BFA02ADD2366b30bacB125260Af641031331"
yarn lint:fix