DelayedClaimable.sol 546 B

12345678910111213141516171819202122232425
  1. pragma solidity ^0.4.4;
  2. import './Ownable.sol';
  3. import './Claimable.sol';
  4. /*
  5. * DelayedClaimable
  6. * Extension for the Claimable contract, where the ownership needs to be claimed before certain time
  7. */
  8. contract DelayedClaimable is Ownable, Claimable {
  9. uint public claimBefore;
  10. function setDelay(uint _claimBefore) onlyOwner {
  11. claimBefore = _claimBefore;
  12. }
  13. function claimOwnership() onlyPendingOwner {
  14. if (block.number > claimBefore)
  15. throw;
  16. owner = pendingOwner;
  17. pendingOwner = 0x0;
  18. claimBefore = 0;
  19. }
  20. }