We do not need the appIds in the reimbursement app
this might make it easier to deploy?
This commit is contained in:
parent
6bc6bcb7f6
commit
b22d16e61e
@ -6,6 +6,7 @@ import "@aragon/os/contracts/kernel/IKernel.sol";
|
|||||||
contract Reimbursement is AragonApp {
|
contract Reimbursement is AragonApp {
|
||||||
bytes32 public constant ADD_REIMBURSEMENT_ROLE = keccak256("ADD_REIMBURSEMENT_ROLE");
|
bytes32 public constant ADD_REIMBURSEMENT_ROLE = keccak256("ADD_REIMBURSEMENT_ROLE");
|
||||||
bytes32 public constant VETO_REIMBURSEMENT_ROLE = keccak256("VETO_REIMBURSEMENT_ROLE");
|
bytes32 public constant VETO_REIMBURSEMENT_ROLE = keccak256("VETO_REIMBURSEMENT_ROLE");
|
||||||
|
// bytes32 public constant MANAGE_APPS_ROLE = keccak256("MANAGE_APPS_ROLE");
|
||||||
|
|
||||||
struct ReimbursementData {
|
struct ReimbursementData {
|
||||||
uint32 recipientId;
|
uint32 recipientId;
|
||||||
@ -27,13 +28,14 @@ contract Reimbursement is AragonApp {
|
|||||||
event ReimbursementAdded(uint32 id, address indexed addedByAccount, uint256 amount);
|
event ReimbursementAdded(uint32 id, address indexed addedByAccount, uint256 amount);
|
||||||
event ReimbursementVetoed(uint32 id, address vetoedByAccount);
|
event ReimbursementVetoed(uint32 id, address vetoedByAccount);
|
||||||
|
|
||||||
// TODO: remove _appIds when those are removed from the kreditskit
|
function initialize() public onlyInit {
|
||||||
// using the appids to find other apps is wrong according to aragon
|
|
||||||
function initialize(bytes32[5] _appIds) public onlyInit {
|
|
||||||
blocksToWait = 40320; // 7 days; 15 seconds block time
|
blocksToWait = 40320; // 7 days; 15 seconds block time
|
||||||
initialized();
|
initialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// function setApps() public isInitialized auth(MANAGE_APPS_ROLE) {
|
||||||
|
// }
|
||||||
|
|
||||||
function totalAmount(bool confirmedOnly) public view returns (uint256 amount) {
|
function totalAmount(bool confirmedOnly) public view returns (uint256 amount) {
|
||||||
for (uint32 i = 1; i <= reimbursementsCount; i++) {
|
for (uint32 i = 1; i <= reimbursementsCount; i++) {
|
||||||
ReimbursementData memory r = reimbursements[i];
|
ReimbursementData memory r = reimbursements[i];
|
||||||
|
@ -50,7 +50,7 @@ contract KreditsKit is KitBase {
|
|||||||
proposal.initialize(appIds);
|
proposal.initialize(appIds);
|
||||||
|
|
||||||
Reimbursement reimbursement = Reimbursement(_installApp(dao, appIds[uint8(Apps.Reimbursement)]));
|
Reimbursement reimbursement = Reimbursement(_installApp(dao, appIds[uint8(Apps.Reimbursement)]));
|
||||||
reimbursement.initialize(appIds);
|
reimbursement.initialize();
|
||||||
acl.createPermission(root, reimbursement, reimbursement.ADD_REIMBURSEMENT_ROLE(), this);
|
acl.createPermission(root, reimbursement, reimbursement.ADD_REIMBURSEMENT_ROLE(), this);
|
||||||
acl.createPermission(root, reimbursement, reimbursement.VETO_REIMBURSEMENT_ROLE(), this);
|
acl.createPermission(root, reimbursement, reimbursement.VETO_REIMBURSEMENT_ROLE(), this);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user