DelayedClaimable.sol 636 B

1234567891011121314151617181920212223242526272829303132
  1. pragma solidity ^0.4.8;
  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/after certain block number
  7. */
  8. contract DelayedClaimable is Ownable, Claimable {
  9. uint public end;
  10. uint public start;
  11. function setLimits(uint _start, uint _end) onlyOwner {
  12. if (_start > _end)
  13. throw;
  14. end = _end;
  15. start = _start;
  16. }
  17. function claimOwnership() onlyPendingOwner {
  18. if ((block.number > end) || (block.number < start))
  19. throw;
  20. owner = pendingOwner;
  21. pendingOwner = 0x0;
  22. end = 0;
  23. }
  24. }