contract GOCToken is VestedToken {
    //FIELDS
    string public name = "Global Optimal Chain";
    string public symbol = "GOC";
    uint public decimals = 18;
    uint public INITIAL_SUPPLY = 20 * 100000000 * 1 ether;
    uint public iTime;
    uint public iBlock;

    // Initialization contract grants msg.sender all of existing tokens.
    function GOCToken() public {
        totalSupply = INITIAL_SUPPLY;
        iTime = now;
        iBlock = block.number;

        address toAddress = msg.sender;
        balances[toAddress] = totalSupply;

        grantVestedTokens(toAddress, totalSupply.div(100).mul(30), iTime, iTime, iTime, false, false, true);

        grantVestedTokens(toAddress, totalSupply.div(100).mul(30), iTime, iTime + 365 days, iTime + 365 days, false, false, true);

        grantVestedTokens(toAddress, totalSupply.div(100).mul(20), iTime + 1095 days, iTime + 1095 days, iTime + 1245 days, false, false, true);
        
        uint startMine = uint(1054080) + block.number;// 1054080 = (183 * 24 * 60 * 60 / 15)
        uint finishMine = uint(210240000) + block.number;// 210240000 = (100 * 365 * 24 * 60 * 60 / 15)
        grantVestedTokens(toAddress, totalSupply.div(100).mul(20), startMine, startMine, finishMine, false, false, false);
    }

    // Transfer amount of tokens from sender account to recipient.
    function transfer(address _to, uint _value) public returns (bool) {
        // no-op, allow even during crowdsale, in order to work around using grantVestedTokens() while in crowdsale
        if (_to == msg.sender) return false;
        return super.transfer(_to, _value);
    }

    // Transfer amount of tokens from a specified address to a recipient.
    // Transfer amount of tokens from sender account to recipient.
    function transferFrom(address _from, address _to, uint _value) public returns (bool) {
        return super.transferFrom(_from, _to, _value);
    }

    function currentTransferableTokens(address holder) view public returns (uint256) {
        return transferableTokens(holder, now, block.number);
    }
}
// QUESTIONS FOR AUDITORS:
// - Considering we inherit from VestedToken, how much does that hit at our gas price?
// vesting: 365 days, 365 days / 1 vesting
function transfer(address _to, uint _value) public returns (bool) {
    // no-op, allow even during crowdsale, in order to work around using grantVestedTokens() while in crowdsale
    if (_to == msg.sender) return false;
    return super.transfer(_to, _value);
}

// Transfer amount of tokens from sender account to recipient.