Claimable.sol 542 B

123456789101112131415161718192021222324252627282930
  1. pragma solidity ^0.4.0;
  2. import './Ownable.sol';
  3. /*
  4. * Claimable
  5. *
  6. * Extension for the Ownable contract, where the ownership needs to be claimed. This allows the new owner to accept the transfer.
  7. */
  8. contract Claimable is Ownable {
  9. address public pendingOwner;
  10. modifier onlyPendingOwner() {
  11. if (msg.sender == pendingOwner)
  12. _;
  13. }
  14. function transfer(address newOwner) onlyOwner {
  15. pendingOwner = newOwner;
  16. }
  17. function claimOwnership() onlyPendingOwner {
  18. owner = pendingOwner;
  19. pendingOwner = 0x0;
  20. }
  21. }