Created
March 24, 2019 21:08
-
-
Save juntao/cc1565b76949a6bbd8bfb15aa9e53dc8 to your computer and use it in GitHub Desktop.
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 lity ^1.2.4; | |
contract Human { | |
address public owner; | |
modifier onlyOwner() { | |
assert(msg.sender == owner); | |
_; | |
} | |
constructor () public { | |
owner = msg.sender; | |
} | |
function greet() pure public returns (string) { | |
return "Hello world"; | |
} | |
function terminate() external onlyOwner { | |
selfdestruct(owner); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment