Claimable.sol 645 B

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