Skip to content

Instantly share code, notes, and snippets.

@muellerberndt
Last active January 26, 2018 03:05
Show Gist options
  • Save muellerberndt/4358cdfdc099dddf682c695949b3bd48 to your computer and use it in GitHub Desktop.
Save muellerberndt/4358cdfdc099dddf682c695949b3bd48 to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.18;
contract Ownable {
address public owner;
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
owner = newOwner;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment