You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
548 B
30 lines
548 B
8 years ago
|
pragma solidity ^0.4.0;
|
||
8 years ago
|
|
||
|
|
||
8 years ago
|
import './Ownable.sol';
|
||
|
|
||
8 years ago
|
|
||
8 years ago
|
/*
|
||
|
* Claimable
|
||
8 years ago
|
*
|
||
|
* Extension for the Ownable contract, where the ownership needs to be claimed. This allows the new owner to accept the transfer.
|
||
8 years ago
|
*/
|
||
|
contract Claimable is Ownable {
|
||
|
address public pendingOwner;
|
||
|
|
||
|
modifier onlyPendingOwner() {
|
||
|
if (msg.sender == pendingOwner)
|
||
|
_;
|
||
|
}
|
||
|
|
||
8 years ago
|
function transferOwnership(address newOwner) onlyOwner {
|
||
8 years ago
|
pendingOwner = newOwner;
|
||
|
}
|
||
|
|
||
|
function claimOwnership() onlyPendingOwner {
|
||
|
owner = pendingOwner;
|
||
|
pendingOwner = 0x0;
|
||
|
}
|
||
|
|
||
|
}
|