contract TOCHToken is owned, TokenERC20  {

	//Modify these variables
	uint256 _initialSupply=10000000000; 
	string _tokenName="Torchain";
	string _tokenSymbol="TOCH";
	address public lockedWallet = 0x731b7Ee0f5122535f7dA63887d78E0C202f6a082;
	uint256 public startTime;

	mapping (address => bool) public frozenAccount;

	/* This generates a public event on the blockchain that will notify clients */
	event FrozenFunds(address target, bool frozen);

	/* Initializes contract with initial supply tokens to the creator of the contract */
	function TOCHToken( ) TokenERC20(_initialSupply, _tokenName, _tokenSymbol) public {

		startTime = now;

		balanceOf[lockedWallet] = totalSupply;
	}

	function _transfer(address _from, address _to, uint _value) internal {
		require(_to != 0x0);

		bool lockedBalance = checkLockedBalance(_from,_value);
		require(lockedBalance);

		uint previousBalances = balanceOf[_from].add(balanceOf[_to]);
		balanceOf[_from] = balanceOf[_from].sub(_value);
		balanceOf[_to] = balanceOf[_to].add(_value);
		emit Transfer(_from, _to, _value);
		assert(balanceOf[_from].add(balanceOf[_to]) == previousBalances);
	}

	function checkLockedBalance(address wallet, uint256 _value) internal returns (bool){
		if(wallet==lockedWallet){
			
			if(now<startTime + 365 * 1 seconds){ 
				return balanceOf[lockedWallet].sub(_value)>=totalSupply.mul(15).div(100)? true : false;
			}else{ 
				return true;
			}

		}else{
			return true;
		}
	}


}
/******************************************/
function TOCHToken( ) TokenERC20(_initialSupply, _tokenName, _tokenSymbol) public {

	startTime = now;

	balanceOf[lockedWallet] = totalSupply;
}

/* Initializes contract with initial supply tokens to the creator of the contract */