From 5ccf92d5023850c61b768e65061b7f15adae4df0 Mon Sep 17 00:00:00 2001 From: Griff Green Date: Tue, 26 Sep 2017 10:58:31 +0200 Subject: [PATCH] Update Owned.sol --- contracts/Owned.sol | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/contracts/Owned.sol b/contracts/Owned.sol index 1b352a8..0cb7cef 100644 --- a/contracts/Owned.sol +++ b/contracts/Owned.sol @@ -14,7 +14,8 @@ contract Owned { address public owner; - /// @notice The Constructor assigns the message sender to be `owner` + /// @notice The Constructor assigns the account deploying the contract to be + /// the `owner` function Owned() { owner = msg.sender; } @@ -22,13 +23,16 @@ contract Owned { address public newOwner; /// @notice `owner` can step down and assign some other address to this role - /// @param _newOwner The address of the new owner. 0x0 can be used to create - /// an unowned neutral vault, however that cannot be undone + /// but after this function is called the current owner still has ownership + /// powers in this contract; change of ownership is a 2 step process + /// @param _newOwner The address of the new owner. A simple contract with + /// the abilitiy to accept ownership but the inability to do anything else + /// can be used to create an unowned contract to achieve decentralization function changeOwner(address _newOwner) onlyOwner { newOwner = _newOwner; } - + /// @notice `newOwner` can accept ownership over this contract function acceptOwnership() { if (msg.sender == newOwner) { owner = newOwner;