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