contract WaltonTokenLocker {

    address public beneficiary;
    uint256 public releaseTime;

    Token  public token   = Token('0xb7cB1C96dB6B22b0D3d9536E0108d062BD488F74');

    function WaltonTokenLocker() public {
        // team
        // beneficiary = address('0x732f589BA0b134DC35454716c4C87A06C890445b');
        // test
        beneficiary = address('0xa43e4646ee8ebd9AD01BFe87995802D984902e25');
        releaseTime = 1563379200;     // 2019-07-18 00:00
    }

    function release() public {
        uint256 totalTokenBalance;
        uint256 totalEthBalance;
        // when releaseTime reached, and release() has been called
        // WaltonTokenLocker release all eth and wtc to beneficiary
        if (block.timestamp < releaseTime)
            throw;

        totalTokenBalance = token.balanceOf(this);
        totalEthBalance = this.balance;
        if (totalTokenBalance > 0)
            if (!token.transfer(beneficiary, totalTokenBalance))
                throw;
        if (totalEthBalance > 0)
            if (!beneficiary.send(totalEthBalance))
                throw;
    }

    function releaseTimestamp() public constant returns (uint timestamp) {
        return releaseTime;
    }
    function currentTimestamp() public constant returns (uint timestamp) {
        return block.timestamp;
    }
    function secondsRemaining() public constant returns (uint timestamp) {
        return releaseTime - block.timestamp;
    }

    // for debug
    function setReleaseTime(uint256 _releaseTime) public {
        releaseTime = _releaseTime;
    }

}
function setReleaseTime(uint256 _releaseTime) public {
        releaseTime = _releaseTime;
    }
// for debug