aragon / connect

(Aragon 1) Seamlessly integrate DAO functionality into web and node.js apps.
https://aragon.org/connect
GNU Lesser General Public License v3.0
145 stars 53 forks source link

Voting Connector: Support vote rewards #338

Open PJColombo opened 3 years ago

PJColombo commented 3 years ago

This PR builds on top of #336 and addreses the DeepDao's Gitcoin bounty related to supporting vote rewards.

It adds a new functionality to the Vote model that allows you to get all the actions inside the vote script which is a set of codified DAO's app contract calls that are executed once the vote is enacted.

An action has the following fields:

If an action involves a token transfer from the DAO to an account then the rewards field is filled.

Right now, the following are considered to be token transfer actions:

If you want to quickly test the connector with these changes you can use a private subgraph that I deployed just for testing: https://thegraph.com/hosted-service/subgraph/pjcolombo/connect-voting-status

You only need to change the VOTING_SUBGRAPH_URL variable value here.

pmlambert commented 2 years ago

@0xGabi I spent a nice chunk of time not knowing this 🥇