← Back to home

Gitcoin Delegation Graph

TypeScript

Gitcoin just announced they'll be doing a DAO! As an avid user (and browser) of their hackathons, bounties, and activities, I thought it would be great to make it easy for people to observe DAO activity much like other DAOs.

Screenshots

Gitcoin Delegation Graph screenshot 1

Problem Statement

As an avid user of Gitcoin, I'm excited to see how their DAO works out. I follow their hackathons, bounties, and activities quite closely. This project uses The Graph to try map out the delegates/delegatee relationship as I saw that other DAOs use the graph as some sort of database backend to monitor the health of the DAO. So as Gitcoin just started releasing their governance tokens, this can serve as the starting point for a data monitoring service for a very popular piece of Ethereum's ecosystem.

Solution

This project uses The Graph's tools. Mainly graph-cli. However for this project to come together, we need etherscan for the contract ABIs and checking that the graph is correct, typescript for the mappings, and typical ethereum devtools like ganache and truffle.The steps were.Find the right smart contractUse graph-cli to generate the initial documentsDefine a schemaLook at the generated schemas that you can check for entities/ eventsSet up the right mapping. (but first STUDY THE SMART CONTRACT CLOSELY) I wasted quite a lot of time looking at the wrong event.Set up an account on The GraphSet up your github repoUse graph-cli to deploy it! The subgraph goes up onto ipfs and shows up on The Graph's explorer. It then syncs with the blockchainvoila!disclaimer: this is my first time using The Graph so I am still trying my best to see what I can do!

Hackathon

Web3 Weekend

2024

Contributors