This repository was archived by the owner on May 22, 2025. It is now read-only.
Conversation
PJColombo
force-pushed
the
support-vote-rewards
branch
from
November 12, 2021 14:52
ef0b2f1 to
095d1ac
Compare
PJColombo
marked this pull request as ready for review
November 12, 2021 18:22
PJColombo
force-pushed
the
support-vote-rewards
branch
from
November 12, 2021 18:34
4a53c87 to
0f56ea6
Compare
kanaagawa
approved these changes
Nov 13, 2021
kanaagawa
left a comment
Contributor
There was a problem hiding this comment.
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.
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?
This branch has not been deployed
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
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
Votemodel that allows you to get all the actions inside the votescriptwhich 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
rewardsfield 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_URLvariable value here.