Files
openzeppelin-contracts/contracts/ownership/Claimable.sol
Jorge Izquierdo a6a2ee2bf1 Merge with master
2017-05-21 16:08:47 -04:00

32 lines
567 B
Solidity

pragma solidity ^0.4.8;
import './Ownable.sol';
/*
* Claimable
*
* Extension for the Ownable contract, where the ownership needs to be claimed. This allows the new owner to accept the transfer.
*/
contract Claimable is Ownable {
address public pendingOwner;
modifier onlyPendingOwner() {
if (msg.sender != pendingOwner) {
throw;
}
_;
}
function transferOwnership(address newOwner) onlyOwner {
pendingOwner = newOwner;
}
function claimOwnership() onlyPendingOwner {
owner = pendingOwner;
pendingOwner = 0x0;
}
}