Files
openzeppelin-contracts/contracts/DelayedClaimable.sol
2016-11-19 12:13:09 -03:00

29 lines
628 B
Solidity

pragma solidity ^0.4.4;
import './Ownable.sol';
import './Claimable.sol';
/*
* DelayedClaimable
* Extension for the Claimable contract, where the ownership needs to be claimed before certain block number
*/
contract DelayedClaimable is Ownable, Claimable {
uint public claimBeforeBlock;
modifier claimBefore() {
if (block.number < claimBeforeBlock)
_;
}
function setClaimBefore(uint _claimBeforeBlock) onlyOwner {
claimBeforeBlock = _claimBeforeBlock;
}
function claimOwnership() onlyPendingOwner claimBefore {
owner = pendingOwner;
pendingOwner = 0x0;
claimBeforeBlock = 0;
}
}