Last active
March 30, 2018 08:58
-
-
Save igroomgrim/b9552c0677fc4f659a7b7eacb8f06d69 to your computer and use it in GitHub Desktop.
Funny example for Thailand 0.4 Election system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
import "zeppelin-solidity/contracts/math/SafeMath.sol"; | |
contract Thailand { | |
using SafeMath for uint256; | |
address public owner; | |
address public primeMinister; | |
address public commanderInChief; | |
address public chairperson; | |
mapping (address => bool) public prisoners; | |
// Modifier | |
modifier onlyOwner() { | |
require(msg.sender == owner); | |
_; | |
} | |
function Thailand() public { | |
owner = msg.sender; | |
} | |
function nominatePrimeMinister(address _someOneElse) public onlyOwner { | |
primeMinister = _someOneElse; | |
} | |
function nominateCommanderInChief(address _militaryMan) public onlyOwner { | |
commanderInChief = _militaryMan; | |
} | |
function nominateChairperson(address _lazyBoy) public onlyOwner { | |
chairperson = _lazyBoy; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment