Skip to content

Instantly share code, notes, and snippets.

@igroomgrim
Created March 30, 2018 09:01
Show Gist options
  • Save igroomgrim/b9e54a04a65c753e0807123d9c18937c to your computer and use it in GitHub Desktop.
Save igroomgrim/b9e54a04a65c753e0807123d9c18937c to your computer and use it in GitHub Desktop.
Funny example for Thailand 0.4 Election system
pragma solidity ^0.4.18;
contract Proposal {
address public creator; // Candidate
string public manifesto;
modifier onlyCreator {
require(msg.sender == creator);
_;
}
function Proposal(address _creator, string _manifesto) public {
creator = _creator;
manifesto = _manifesto;
}
function editProposal(string _manifesto) public onlyCreator {
manifesto = _manifesto;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment