Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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