DelayedClaimable.sol 603 B

12345678910111213141516171819202122232425262728293031
  1. pragma solidity ^0.4.8;
  2. import './Claimable.sol';
  3. /*
  4. * DelayedClaimable
  5. * Extension for the Claimable contract, where the ownership needs to be claimed before/after certain block number
  6. */
  7. contract DelayedClaimable is Claimable {
  8. uint public end;
  9. uint public start;
  10. function setLimits(uint _start, uint _end) onlyOwner {
  11. if (_start > _end)
  12. throw;
  13. end = _end;
  14. start = _start;
  15. }
  16. function claimOwnership() onlyPendingOwner {
  17. if ((block.number > end) || (block.number < start))
  18. throw;
  19. owner = pendingOwner;
  20. pendingOwner = 0x0;
  21. end = 0;
  22. }
  23. }