I want to create a system on the blockchain that visualizes a 'humanity score'.
What it does
Dynamic NFT that utilizes Chainlink VRF, Chainlink Functions, and Chainlink Automation. It leverages the Gitcoin Passport's humanity score to show an android's transformation into a human within the NFT.
How we built it
Dynamic NFT State
- The humanity score affects the growth of the android.
- The random seed value affects accessories like hats and eyeglasses.
Unity for Dynamic NFT
- Dynamic NFTs are rendered using Unity and WebGL.
- Unity fetches data from The Graph and updates the state dynamically.
- The web app and Opensea display the same Unity dynamic NFT using an iframe.
Data Integration Diagram
- Gitcoin Passport as a source for humanity scores.
- Chainlink Functions for integrating humanity scores into NFT smart contracts.
- Chainlink Automation to automate the data fetching process.
- Chainlink VRF for generating random seed values.
- The Graph for data aggregation purposes.
- ENS for managing identity data, such as names and avatars.
The details of Chainlink integration are maintained here.
The dynamic NFT is deployed Avalanche C-Chain Fuji Testnet.
Opensea supports Avalanche C-Chain Fuji Testnet and the asset page is here.
The Graph Integration
The Graph is used in a Unity C# script for data aggregation. https://github.com/taijusanagi/link-become-human/blob/main/Assets/Scripts/GameManager.cs#L122
The following subgraphs are integrated.
- https://api.studio.thegraph.com/proxy/60667/linkbecomehuman/v0.0.1/graphql (New)
- https://api.thegraph.com/subgraphs/name/ensdomains/ens/graphql (Existing one for ENS)
- The ENS name is fetched by The Graph and displayed in the dynamic NFT.
- The ENS avatar is fetched by Rainbow Kit SDK.
Challenges we ran into
Using some of the Chainlink modules was a new experience for me, so it took time to learn how to use them.
Accomplishments that we're proud of
I have implemented Chainlink Functions, Chainlink VRF, and Chainlink Automation, and have also demonstrated a working dynamic NFT.
What we learned
- Relevant Chainlink modules
- Unity Development
- The Graph Integration
What's next for Link: Become Human
- Add more accessory for random ness
- Make it production