Files
openzeppelin-contracts/contracts/ownership/DelayedClaimable.sol
Jorge Izquierdo a6a2ee2bf1 Merge with master
2017-05-21 16:08:47 -04:00

32 lines
603 B
Solidity

pragma solidity ^0.4.8;
import './Claimable.sol';
/*
* DelayedClaimable
* Extension for the Claimable contract, where the ownership needs to be claimed before/after certain block number
*/
contract DelayedClaimable is Claimable {
uint public end;
uint public start;
function setLimits(uint _start, uint _end) onlyOwner {
if (_start > _end)
throw;
end = _end;
start = _start;
}
function claimOwnership() onlyPendingOwner {
if ((block.number > end) || (block.number < start))
throw;
owner = pendingOwner;
pendingOwner = 0x0;
end = 0;
}
}