-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Voting connector: Support vote statuses and rewards #32
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
=========================================
- Coverage 5.90% 5.88% -0.03%
=========================================
Files 50 50
Lines 1405 1411 +6
Branches 325 336 +11
=========================================
Hits 83 83
+ Misses 1322 1222 -100
- Partials 0 106 +106
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This PR builds on top of #31. It updates both the Voting connector and subgraph in order to expose the vote status
The vote status can be one of the following:
-Ongoing: The vote hasn't ended.
-Accepted: The vote ended and it's waiting to be executed (pending).
-Rejected: The vote ended and it didn't reach the minimum accepted quorum nor minimum support.
-Executed: The vote was enacted.
It also 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:
to: The target contract address.
fnData: Data related to the function being called.
-- 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.
rewards: An array containing all the action rewards. A reward has the following fields:
-- 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:
Calls to the Vault/Agent's contract function transfer(address _token, address _to, uint256 _value).
Calls to the Finance's contract function newImmediatePayment(address _token, address _receiver, uint256 _amount, string _reference).
Pending tasks: