Created
July 8, 2017 23:03
-
-
Save jbaylina/9b2cd1e40db07e830d08c0140e9eac14 to your computer and use it in GitHub Desktop.
This file contains 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
contract Owned { | |
function Owned() { | |
owner = msg.sender; | |
} | |
address public owner; | |
// This contract only defines a modifier and a few useful functions | |
// The function body is inserted where the special symbol "_" in the | |
// definition of a modifier appears. | |
modifier onlyOwner { if (msg.sender == owner) _; } | |
function changeOwner(address _newOwner) onlyOwner { | |
owner = _newOwner; | |
} | |
// This is a general safty function that allows the owner to do a lot | |
// of things in the unlikely event that something goes wrong | |
// _dst is the contract being called making this like a 1/1 multisig | |
function execute(address _dst, uint _value, bytes _data) onlyOwner { | |
_dst.call.value(_value)(_data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment