mirror of
https://github.com/status-im/visual-identity.git
synced 2025-02-08 18:53:44 +00:00
Updating proposal manager with changes from 000-tcr
This commit is contained in:
parent
05aa20650b
commit
8cec6507eb
@ -3,7 +3,7 @@
|
||||
"versions": {
|
||||
"ipfs-api": "17.2.4"
|
||||
},
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"ipfs_bin": "ipfs",
|
||||
"provider": "ipfs",
|
||||
"available_providers": ["ipfs"],
|
||||
@ -11,7 +11,7 @@
|
||||
"port": 5001
|
||||
},
|
||||
"development": {
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"provider": "ipfs",
|
||||
"host": "localhost",
|
||||
"port": 5001,
|
||||
|
@ -51,7 +51,6 @@ contract ProposalManager is Controlled {
|
||||
{
|
||||
trustNet = _trustNet;
|
||||
token = _token;
|
||||
proposals.length++;
|
||||
|
||||
quorumPercentage = 50;
|
||||
|
||||
@ -88,6 +87,21 @@ contract ProposalManager is Controlled {
|
||||
proposal.voters.push(msg.sender);
|
||||
}
|
||||
|
||||
function getProposalCount()
|
||||
public
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
return proposals.length;
|
||||
}
|
||||
|
||||
function exists(uint _proposalId)
|
||||
public
|
||||
view
|
||||
returns (bool) {
|
||||
return proposals.length != 0 && proposals[_proposalId].blockStart != 0;
|
||||
}
|
||||
|
||||
function tabulateVote(uint _proposalId, address _delegator)
|
||||
public
|
||||
{
|
||||
@ -107,6 +121,7 @@ contract ProposalManager is Controlled {
|
||||
proposal.lastTabulationTimestamp = block.timestamp;
|
||||
}
|
||||
|
||||
|
||||
function getProposalResultsByVote(uint _proposalId, uint8 vote)
|
||||
public
|
||||
view
|
||||
|
Loading…
x
Reference in New Issue
Block a user