DelayedClaimable.sol 582 B

123456789101112131415161718192021222324
  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 block number
  7. */
  8. contract DelayedClaimable is Ownable, Claimable {
  9. uint public claimBeforeBlock;
  10. function setClaimBefore(uint _claimBeforeBlock) onlyOwner {
  11. claimBeforeBlock = _claimBeforeBlock;
  12. }
  13. function claimOwnership() onlyPendingOwner {
  14. if (block.number > claimBeforeBlock) throw;
  15. owner = pendingOwner;
  16. pendingOwner = 0x0;
  17. claimBeforeBlock = 0;
  18. }
  19. }