mirror of
https://github.com/dap-ps/discover.git
synced 2025-01-31 19:45:53 +00:00
Merge branch 'master' of https://github.com/dap-ps/discover
This commit is contained in:
commit
1069143140
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ config/development/mnemonic
|
||||
config/livenet/password
|
||||
config/production/password
|
||||
coverage
|
||||
src/embarkArtifacts
|
||||
embarkArtifacts
|
||||
node_modules
|
||||
package-lock.json
|
||||
|
@ -42,7 +42,7 @@ contract Discover is ApproveAndCallFallBack, BancorFormula {
|
||||
|
||||
Data[] public dapps;
|
||||
mapping(bytes32 => uint) public id2index;
|
||||
mapping(bytes32 => bool) existingIDs;
|
||||
mapping(bytes32 => bool) public existingIDs;
|
||||
|
||||
event DAppCreated(bytes32 indexed id, uint newEffectiveBalance);
|
||||
event Upvote(bytes32 indexed id, uint newEffectiveBalance);
|
||||
@ -96,6 +96,17 @@ contract Discover is ApproveAndCallFallBack, BancorFormula {
|
||||
_downvote(msg.sender, _id, _amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Developers can withdraw an amount not more than what was available of the
|
||||
SNT they originally staked minus what they have already received back in downvotes.
|
||||
* @param _id bytes32 unique identifier.
|
||||
* @return max SNT that can be withdrawn == available SNT for DApp.
|
||||
*/
|
||||
function withdrawMax(bytes32 _id) external view returns(uint) {
|
||||
Data storage d = _getDAppById(_id);
|
||||
return d.available;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Developers can withdraw an amount not more than what was available of the
|
||||
SNT they originally staked minus what they have already received back in downvotes.
|
||||
|
@ -22,5 +22,5 @@
|
||||
"optimize-runs": 200
|
||||
}
|
||||
},
|
||||
"generationDir": "embarkArtifacts"
|
||||
"generationDir": "src/embarkArtifacts"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user