Skip to content

Instantly share code, notes, and snippets.

@TravisMullen
Created June 4, 2017 00:59
Show Gist options
  • Save TravisMullen/13662fb4b092f243149703c10b26b02a to your computer and use it in GitHub Desktop.
Save TravisMullen/13662fb4b092f243149703c10b26b02a to your computer and use it in GitHub Desktop.
Manages contract ownership
// Manages contract ownership.
contract Owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
_;
}
function transferOwnership(address newOwner) onlyOwner {
owner = newOwner;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment