Last active
August 10, 2016 07:10
-
-
Save elenadimitrova/1a3293454043945f9b015d954c51d1d1 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 Ownable { | |
address public owner = msg.sender; | |
/// @notice check if the caller is the owner of the contract | |
modifier onlyOwner { | |
if (msg.sender != owner) throw; | |
_ | |
} | |
/// @notice change the owner of the contract | |
/// @param _newOwner the address of the new owner of the contract. | |
function changeOwner(address _newOwner) | |
onlyOwner | |
{ | |
if(_newOwner == 0x0) throw; | |
owner = _newOwner; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment