|
|
@ -4,15 +4,22 @@ pragma solidity ^0.4.8; |
|
|
|
import './Claimable.sol'; |
|
|
|
import './Claimable.sol'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/** |
|
|
|
* DelayedClaimable |
|
|
|
* @title DelayedClaimable |
|
|
|
* Extension for the Claimable contract, where the ownership needs to be claimed before/after certain block number |
|
|
|
* @dev Extension for the Claimable contract, where the ownership needs to be claimed before/after |
|
|
|
|
|
|
|
* a certain block number. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
contract DelayedClaimable is Claimable { |
|
|
|
contract DelayedClaimable is Claimable { |
|
|
|
|
|
|
|
|
|
|
|
uint public end; |
|
|
|
uint public end; |
|
|
|
uint public start; |
|
|
|
uint public start; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @dev the setLimits function can be used to specify the time period during which a pending |
|
|
|
|
|
|
|
* owner can claim ownership. |
|
|
|
|
|
|
|
* @params _start The earliest time ownership can be claimed |
|
|
|
|
|
|
|
* @params _end The latest time ownership can be claimed. |
|
|
|
|
|
|
|
*/ |
|
|
|
function setLimits(uint _start, uint _end) onlyOwner { |
|
|
|
function setLimits(uint _start, uint _end) onlyOwner { |
|
|
|
if (_start > _end) |
|
|
|
if (_start > _end) |
|
|
|
throw; |
|
|
|
throw; |
|
|
@ -20,6 +27,10 @@ contract DelayedClaimable is Claimable { |
|
|
|
start = _start; |
|
|
|
start = _start; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @dev setLimit() modifier throws if called by any account other than the owner. |
|
|
|
|
|
|
|
*/ |
|
|
|
function claimOwnership() onlyPendingOwner { |
|
|
|
function claimOwnership() onlyPendingOwner { |
|
|
|
if ((block.number > end) || (block.number < start)) |
|
|
|
if ((block.number > end) || (block.number < start)) |
|
|
|
throw; |
|
|
|
throw; |
|
|
|