- This is a very simple voting contract.
- Because txs are private no one knows what people are voting.
- TODOs:
- Prevent double voting
- Prevent voting after a deadline
- Make the tally public only after a deadline
- Or maybe a simpler solution: return the tally only every 10th vote, that way we obfuscate the last vote (after a vote,
if (tally.yes+tally.no) % 10 == 0doset(public_yes, tally.yes)andset(public_no, tally.no)and onget_tallyreturnpublic_yesandpublic_no).
- Or maybe a simpler solution: return the tally only every 10th vote, that way we obfuscate the last vote (after a vote,
scrtlabs/SecretSimpleVote
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|