Add function to configure the associated apps
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
"name": "Manage contributors",
|
||||
"id": "MANAGE_CONTRIBUTORS_ROLE",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"name": "Manage connected apps",
|
||||
"id": "MANAGE_APPS_ROLE",
|
||||
"params": []
|
||||
}
|
||||
],
|
||||
"environments": {
|
||||
|
||||
@@ -13,6 +13,7 @@ interface IContributionBalance {
|
||||
|
||||
contract Contributor is AragonApp {
|
||||
bytes32 public constant MANAGE_CONTRIBUTORS_ROLE = keccak256("MANAGE_CONTRIBUTORS_ROLE");
|
||||
bytes32 public constant MANAGE_APPS_ROLE = keccak256("MANAGE_APPS_ROLE");
|
||||
|
||||
ITokenBalance public kreditsToken;
|
||||
IContributionBalance public kreditsContribution;
|
||||
@@ -39,6 +40,11 @@ contract Contributor is AragonApp {
|
||||
initialized();
|
||||
}
|
||||
|
||||
function setApps(address _contribution, address _token) public isInitialized auth(MANAGE_APPS_ROLE) {
|
||||
kreditsToken = ITokenBalance(_token);
|
||||
kreditsContribution = IContributionBalance(_contribution);
|
||||
}
|
||||
|
||||
function coreContributorsCount() public view returns (uint32) {
|
||||
uint32 count = 0;
|
||||
for (uint32 i = 1; i <= contributorsCount; i++) {
|
||||
|
||||
Reference in New Issue
Block a user