Skip to content

Instantly share code, notes, and snippets.

@kingcocomango
Last active April 27, 2017 14:43
Show Gist options
  • Save kingcocomango/92a70bdb4c0798507ce5b2469ca40ec1 to your computer and use it in GitHub Desktop.
Save kingcocomango/92a70bdb4c0798507ce5b2469ca40ec1 to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.10;
contract voterecorder {
event Voted(address voter, uint voteid);// this is the event to hook onto
VOTECOST = 1 finney; // This is the cost of voting
function Vote(uint voteid) external payable{// or string or whatever to identify WHAT they are voting for
if(msg.value < VOTECOST){
throw;
}
Voted(msg.sender, voteid);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment