Skip to content

Instantly share code, notes, and snippets.

@cag
Last active March 27, 2018 20:19
Show Gist options
  • Save cag/74d6ddec35fe9442d34a4082fe87c494 to your computer and use it in GitHub Desktop.
Save cag/74d6ddec35fe9442d34a4082fe87c494 to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.21;
contract OwnableData {
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
address internal owner;
function OwnableData(address _owner)
public
{
owner = _owner;
}
}
contract Ownable is OwnableData {
function setOwner(address newOwner)
public
onlyOwner
{
owner = newOwner;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment