Commit b59469c1 by Yevhenii Babichenko

fire OwnershipTransferred event when the owner of an Ownable contract instance actually changed

parent b07466a4
...@@ -34,5 +34,6 @@ contract Claimable is Ownable { ...@@ -34,5 +34,6 @@ contract Claimable is Ownable {
function claimOwnership() onlyPendingOwner { function claimOwnership() onlyPendingOwner {
owner = pendingOwner; owner = pendingOwner;
pendingOwner = 0x0; pendingOwner = 0x0;
OwnershipTransferred(owner);
} }
} }
...@@ -36,6 +36,7 @@ contract DelayedClaimable is Claimable { ...@@ -36,6 +36,7 @@ contract DelayedClaimable is Claimable {
owner = pendingOwner; owner = pendingOwner;
pendingOwner = 0x0; pendingOwner = 0x0;
end = 0; end = 0;
OwnershipTransferred(owner);
} }
} }
...@@ -10,6 +10,9 @@ contract Ownable { ...@@ -10,6 +10,9 @@ contract Ownable {
address public owner; address public owner;
event OwnershipTransferred(address indexed newOwner);
/** /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender * @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account. * account.
...@@ -35,6 +38,7 @@ contract Ownable { ...@@ -35,6 +38,7 @@ contract Ownable {
function transferOwnership(address newOwner) onlyOwner { function transferOwnership(address newOwner) onlyOwner {
require(newOwner != address(0)); require(newOwner != address(0));
owner = newOwner; owner = newOwner;
OwnershipTransferred(newOwner);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment