Add batch voting for proposals #26
@ -110,7 +110,14 @@ contract Operator is Upgradeable {
|
|||||||
ProposalVoted(proposalId, voterId, p.votesCount);
|
ProposalVoted(proposalId, voterId, p.votesCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function batchVote(uint256[] _proposalIds) public coreOnly {
|
||||||
|
for (uint256 i = 0; i < _proposalIds.length; i++) {
|
||||||
|
vote(_proposalIds[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function executeProposal(uint proposalId) private {
|
function executeProposal(uint proposalId) private {
|
||||||
|
|
||||||
var p = proposals[proposalId];
|
var p = proposals[proposalId];
|
||||||
require(!p.executed);
|
require(!p.executed);
|
||||||
require(p.votesCount >= p.votesNeeded);
|
require(p.votesCount >= p.votesNeeded);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user