fire OwnershipTransferred event when the owner of an Ownable contract instance actually changed
This commit is contained in:
@ -34,5 +34,6 @@ contract Claimable is Ownable {
|
||||
function claimOwnership() onlyPendingOwner {
|
||||
owner = pendingOwner;
|
||||
pendingOwner = 0x0;
|
||||
OwnershipTransferred(owner);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ contract DelayedClaimable is Claimable {
|
||||
owner = pendingOwner;
|
||||
pendingOwner = 0x0;
|
||||
end = 0;
|
||||
OwnershipTransferred(owner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -10,6 +10,9 @@ contract Ownable {
|
||||
address public owner;
|
||||
|
||||
|
||||
event OwnershipTransferred(address indexed newOwner);
|
||||
|
||||
|
||||
/**
|
||||
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
|
||||
* account.
|
||||
@ -35,6 +38,7 @@ contract Ownable {
|
||||
function transferOwnership(address newOwner) onlyOwner {
|
||||
require(newOwner != address(0));
|
||||
owner = newOwner;
|
||||
OwnershipTransferred(newOwner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user