Hi Folks! Dennison here!
I created a Yearn Governance subgraph to help query the network regarding Yearn Governance.
You can check out the Playground at The Graph:
https://thegraph.com/explorer/subgraph/crazyrabbitltc/yearngovernance?version=current
You can make queries from your front end code here:
https://api.thegraph.com/subgraphs/name/crazyrabbitltc/yearngovernance
Example Queries:
List all Proposal:
{
proposals{
id
quorum
quorumReached
quorumRequired
metadata
forVotes
againstVotes
}
}
To get all voters, their proposals they proposed and if they are staking (plus more:
{
voters{
id
proposalsProposed{
id
}
ballotsCast {
id
support
}
stakedAmount
staking
paidReward
}
}
If you check out the playground you will see many more kinds of queries you can access via The Graph decentralized network!