Add function to configure the associated apps
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
"name": "Vote proposals",
|
||||
"id": "VOTE_PROPOSAL_ROLE",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"name": "Manage connected apps",
|
||||
"id": "MANAGE_APPS_ROLE",
|
||||
"params": []
|
||||
}
|
||||
],
|
||||
"environments": {
|
||||
|
||||
@@ -17,6 +17,7 @@ contract Proposal is AragonApp {
|
||||
|
||||
bytes32 public constant ADD_PROPOSAL_ROLE = keccak256("ADD_PROPOSAL_ROLE");
|
||||
bytes32 public constant VOTE_PROPOSAL_ROLE = keccak256("VOTE_PROPOSAL_ROLE");
|
||||
bytes32 public constant MANAGE_APPS_ROLE = keccak256("MANAGE_APPS_ROLE");
|
||||
|
||||
IContributor public kreditsContributor;
|
||||
IContribution public kreditsContribution;
|
||||
@@ -50,6 +51,11 @@ contract Proposal is AragonApp {
|
||||
initialized();
|
||||
}
|
||||
|
||||
function setApps(address _contributor, address _contribution) public isInitialized auth(MANAGE_APPS_ROLE) {
|
||||
kreditsContributor = IContributor(_contributor);
|
||||
kreditsContribution = IContribution(_contribution);
|
||||
}
|
||||
|
||||
function addProposal(uint32 contributorId, uint32 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(ADD_PROPOSAL_ROLE) {
|
||||
require(kreditsContributor.exists(contributorId), 'CONTRIBUTOR_NOT_FOUND');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user