contract LINIX_Seedblock is Helper, Ownable
{
    using SafeMath for uint;
    
    string public name;
    string public symbol;
    uint public decimals;
    
    uint constant private zeroAfterDecimal = 10**18;
    
    uint constant public maxSupply             = 2625000 * zeroAfterDecimal;
    
    uint constant public maxSupply_SeedBlock        =   2625000 * zeroAfterDecimal;

    
    uint public issueToken_Total;
    
    uint public issueToken_SeedBlock;
    
    uint public burnTokenAmount;
    
    mapping (address => uint) public balances;
    mapping (address => mapping ( address => uint )) public approvals;

    bool public tokenLock = true;
    bool public saleTime = true;
    uint public endSaleTime = 0;
    
    event Burn(address indexed _from, uint _value);
    
    event Issue_SeedBlock(address indexed _to, uint _tokens);
    
    event TokenUnLock(address indexed _to, uint _tokens);

    
    constructor() public
    {
        name        = "LNXSB";
        decimals    = 18;
        symbol      = "LNSB";
        
        issueToken_Total      = 0;
        
        issueToken_SeedBlock     = 0;

        
        require(maxSupply == maxSupply_SeedBlock);

    }
    
    // ERC - 20 Interface -----

    function totalSupply() view public returns (uint) {
        return issueToken_Total;}
    
    function balanceOf(address _who) view public returns (uint) {
        uint balance = balances[_who];
        
        return balance;}
    
    function transfer(address _to, uint _value) public returns (bool) {
        require(isTransferable() == true);
        require(balances[msg.sender] >= _value);
        
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        
        emit Transfer(msg.sender, _to, _value);
        
        return true;}
    
    function approve(address _spender, uint _value) public returns (bool){
        require(isTransferable() == true);
        require(balances[msg.sender] >= _value);
        
        approvals[msg.sender][_spender] = _value;
        
        emit Approval(msg.sender, _spender, _value);
        
        return true; }
    
    function allowance(address _owner, address _spender) view public returns (uint) {
        return approvals[_owner][_spender];}

    function transferFrom(address _from, address _to, uint _value) public returns (bool) {
        require(isTransferable() == true);
        require(balances[_from] >= _value);
        require(approvals[_from][msg.sender] >= _value);
        
        approvals[_from][msg.sender] = approvals[_from][msg.sender].sub(_value);
        balances[_from] = balances[_from].sub(_value);
        balances[_to]  = balances[_to].add(_value);
        
        emit Transfer(_from, _to, _value);
        
        return true;}
    
    // -----
    
    // Issue Function -----


    function issue_noVesting_Public(address _to, uint _value) onlyOwner_creator public
    {
        uint tokens = _value * zeroAfterDecimal;
        require(maxSupply_SeedBlock >= issueToken_SeedBlock.add(tokens));
        
        balances[_to] = balances[_to].add(tokens);
        
        issueToken_Total = issueToken_Total.add(tokens);
        issueToken_SeedBlock = issueToken_SeedBlock.add(tokens);
        
        emit Issue_SeedBlock(_to, tokens);
    }    
    
       // Lock Function -----
    
    function isTransferable() private view returns (bool)
    {
        if(tokenLock == false)
        {
            return true;
        }
        else if(msg.sender == Owner_manager)
        {
            return true;
        }
        
        return false;
    }
    
    function setTokenUnlock() onlyOwner_manager public
    {
        require(tokenLock == true);
        require(saleTime == false);
        
        tokenLock = false;
    }
    
    function setTokenLock() onlyOwner_manager public
    {
        require(tokenLock == false);
        
        tokenLock = true;
    }
    
    // -----
    
    // ETC / Burn Function -----
    
    function () payable external
    {
        revert();
    }
    
    function endSale() onlyOwner_manager public
    {
        require(saleTime == true);
        
        saleTime = false;
        
        uint time = now;
        
        endSaleTime = time;
        
    }
    
    function withdrawTokens(address _contract, uint _decimals, uint _value) onlyOwner_manager public
    {

        if(_contract == address(0x0))
        {
            uint eth = _value.mul(10 ** _decimals);
            msg.sender.transfer(eth);
        }
        else
        {
            uint tokens = _value.mul(10 ** _decimals);
            Helper(_contract).transfer(msg.sender, tokens);
            
            emit Transfer(address(0x0), msg.sender, tokens);
        }
    }
    
    function burnToken(uint _value) onlyOwner_manager public
    {
        uint tokens = _value * zeroAfterDecimal;
        
        require(balances[msg.sender] >= tokens);
        
        balances[msg.sender] = balances[msg.sender].sub(tokens);
        
        burnTokenAmount = burnTokenAmount.add(tokens);
        issueToken_Total = issueToken_Total.sub(tokens);
        
        emit Burn(msg.sender, tokens);
    }
    
    function close() onlyOwner_master public
    {
        selfdestruct(msg.sender);
    }
    
    // -----
}
function () payable external
{
    revert();
}

// -----
// ETC / Burn Function -----