Compare commits
6 Commits
kit/add-va
...
feature/18
| Author | SHA1 | Date | |
|---|---|---|---|
| 5fd9de70f6 | |||
| a318fe8374 | |||
| eded4a811f | |||
| 66a37a1e74 | |||
| aba4a23104 | |||
| 13ed02e134 |
4
.github/release-drafter.yml
vendored
Normal file
4
.github/release-drafter.yml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
||||
@@ -21,6 +21,19 @@ contract Contributor is AragonApp {
|
||||
uint8 hashFunction;
|
||||
uint8 hashSize;
|
||||
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;
|
||||
|
||||
@@ -28,7 +28,7 @@ class Contributor {
|
||||
github_username,
|
||||
gitea_username,
|
||||
wiki_username,
|
||||
accounts,
|
||||
zoom_display_name,
|
||||
} = this;
|
||||
|
||||
let data = {
|
||||
@@ -36,7 +36,7 @@ class Contributor {
|
||||
'@type': 'Contributor',
|
||||
kind,
|
||||
name,
|
||||
accounts: accounts || [],
|
||||
accounts: [],
|
||||
};
|
||||
|
||||
if (url) {
|
||||
@@ -68,6 +68,13 @@ class Contributor {
|
||||
});
|
||||
}
|
||||
|
||||
if (zoom_display_name) {
|
||||
data.accounts.push({
|
||||
'site': 'zoom.us',
|
||||
'username': zoom_display_name,
|
||||
});
|
||||
}
|
||||
|
||||
// Write it pretty to ipfs
|
||||
return JSON.stringify(data, null, 2);
|
||||
}
|
||||
@@ -97,10 +104,11 @@ class Contributor {
|
||||
accounts,
|
||||
} = JSON.parse(serialized.toString('utf8'));
|
||||
|
||||
let github_username, github_uid, gitea_username, wiki_username;
|
||||
let github_username, github_uid, gitea_username, wiki_username, zoom_display_name;
|
||||
let github = accounts.find(a => a.site === 'github.com');
|
||||
let gitea = accounts.find(a => a.site === 'gitea.kosmos.org');
|
||||
let wiki = accounts.find(a => a.site === 'wiki.kosmos.org');
|
||||
let zoom = accounts.find(a => a.site === 'zoom.us');
|
||||
|
||||
if (github) {
|
||||
(({ username: github_username, uid: github_uid} = github));
|
||||
@@ -111,6 +119,9 @@ class Contributor {
|
||||
if (wiki) {
|
||||
(({ username: wiki_username } = wiki));
|
||||
}
|
||||
if (zoom) {
|
||||
(({ username: zoom_display_name } = zoom));
|
||||
}
|
||||
|
||||
return {
|
||||
name,
|
||||
@@ -121,6 +132,7 @@ class Contributor {
|
||||
github_username,
|
||||
gitea_username,
|
||||
wiki_username,
|
||||
zoom_display_name,
|
||||
ipfsData: serialized,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user