This repository was archived by the owner on May 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Voting Connector: Support vote rewards #338
Open
PJColombo
wants to merge
11
commits into
aragon:master
Choose a base branch
from
PJColombo:support-vote-rewards
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ef0b2f1
to
095d1ac
Compare
4a53c87
to
0f56ea6
Compare
0xGabi
approved these changes
Nov 13, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work and well done with the unit testing. Reading them made me realize that the final structure you choose for the data was the right one. I left a couple of comments and an open question about your thoughts for the getRewards
function.
@0xGabi I spent a nice chunk of time not knowing this 🥇 |
Rekard0
reviewed
Jun 17, 2022
|
||
const VOTING_SUBGRAPH_URL = | ||
'https://api.thegraph.com/subgraphs/name/aragon/aragon-voting-rinkeby-staging' | ||
'https://api.thegraph.com/subgraphs/name/aragon/aragon-voting-rinkeby' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tests did not ran successfully, even after swapping the VOTING_SUBGRAPH_URL as stated in the PR description.
- can you provide more context or instruction how you run test locally?
- Is there a way to run the test successfully without swapping the URL?
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 votescript
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:
-- abi: the ABI function fragment.
-- roles: The ACL roles needed to execute the function.
-- sig: The function signature (e.g.
transfer(address,address,uint256)
).-- params: The function parameter values.
-- notice: The function radspec description.
-- amount: The reward's token amount.
-- receiver: The account that receives the reward.
-- token: The reward's token contract address.
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:
transfer(address _token, address _to, uint256 _value)
.newImmediatePayment(address _token, address _receiver, uint256 _amount, string _reference)
.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.