forked from jellegerbrandy/daostack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBallot.sol
32 lines (22 loc) · 792 Bytes
/
Ballot.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pragma solidity ^0.4.4;
/*
*/
import "./Reputation.sol";
/// @title Voting
contract Ballot {
Reputation public reputationContract;
// mapping address to the proposal that they voted
mapping(address => bytes32) public voters;
/// Create a new ballot to choose one of `proposalNames`.
function Ballot(Reputation _reputationContractAddress) {
reputationContract = _reputationContractAddress;
}
/// Give your vote to proposal `proposals[proposal].name`.
function vote(uint proposal);
/// @dev Computes the winning proposal taking all
/// previous votes into account.
function winningProposal() constant returns (uint winningProposal);
function executeWinningProposal() {
// do something with the winning proposal
}
}