Compare commits
1 Commits
master
...
feature/18
Author | SHA1 | Date | |
---|---|---|---|
5fd9de70f6 |
@ -21,6 +21,19 @@ contract Contributor is AragonApp {
|
|||||||
uint8 hashFunction;
|
uint8 hashFunction;
|
||||||
uint8 hashSize;
|
uint8 hashSize;
|
||||||
bool exists;
|
bool exists;
|
||||||
|
// TODO
|
||||||
|
uint256 claimedBalance;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
function withdraw() {
|
||||||
|
// look up contributorId for msg.sender address
|
||||||
|
// require msg.sender is contributor
|
||||||
|
uint256 confirmedKredits = Contribution.totalKreditsEarnedByContributor(contributorId, confirmedOnly=true);
|
||||||
|
uint256 claimableAmount = confirmedKredits - contributor.claimedBalance;
|
||||||
|
// require claimableAmount > 0
|
||||||
|
contributor.claimedBalance += claimableAmount;
|
||||||
|
IToken(token).mintFor(msg.sender, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
mapping (address => uint32) public contributorIds;
|
mapping (address => uint32) public contributorIds;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user