contract LTLNN is ERC20, Ownable {
    using SafeMath for uint256;

    string public name = "Lawtest Token";
    string public symbol ="LTLNN";
    uint256 public decimals = 2;

    uint256 initialSupply = 5000000;    // 50000.00
    uint256 saleBeginTime = 1553558400; // 26 March 2019 г., 0:00:00 GMT
    uint256 saleEndTime = 1553644800;   // 26 March 2019 г., 0:00:00 GMT
    uint256 tokensDestructTime = 1554076799;  // 31 March 2024 г., 23:59:59 GMT
    mapping (address => uint256) private _balances;
    uint256 private _totalSupply;
    uint256 private _amountForSale;

    event Mint(address indexed to, uint256 amount, uint256 amountForSale);
    event TokensDestroyed();

    constructor() public {
        _balances[address(this)] = initialSupply;
        _amountForSale = initialSupply;
        _totalSupply = initialSupply;
    }

    /**
		* @dev Total number of tokens in existence
		*/
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    function amountForSale() public view returns (uint256) {
        return _amountForSale;
    }

    /**
		* @dev Gets the balance of the specified address.
		* @param owner The address to query the balance of.
		* @return An uint256 representing the amount owned by the passed address.
		*/
    function balanceOf(address owner) public view returns (uint256) {
        return _balances[owner];
    }

    /**
		* @dev Transfer token for a specified address
		* @param to The address to transfer to.
		* @param amount The amount to be transferred.
		*/
    function transfer(address to, uint256 amount) external returns (bool) {
        require(block.timestamp < tokensDestructTime);
        require(block.timestamp > saleEndTime);
        _transfer(msg.sender, to, amount);
        emit Transfer(msg.sender, to, amount);
        return true;
    }

    /**
		 * @dev External function that mints an amount of the token and assigns it to
		 * an account. This encapsulates the modification of balances such that the
		 * proper events are emitted.
		 * @param account The account that will receive the created tokens.
		 * @param amount The amount that will be created.
		 */
    function mint(address account, uint256 amount) external onlyOwner {
        require(saleBeginTime < block.timestamp);
        require(saleEndTime > block.timestamp);
        _transfer(address(this),  account, amount);
        emit Mint(account, amount, _amountForSale);
    }

    /**
        *@dev This sends all the funds to owner's address and destroys the contract.
    **/

    function destructContract() external onlyOwner {
        selfdestruct(owner());
    }

    /**
        * @dev Internal function that transfers an amount of the token
        * from `from` to `to`
        * This encapsulates the modification of balances such that the
        * proper events are emitted.
        * @param from The account tokens are transferred from.
        * @param to The account tokens are transferred to.
        * @param amount The amount that will be created.
    */
    function _transfer(address from, address to, uint256 amount) internal {
        require(amount <= _balances[from]);
        require(to != address(0));
        _balances[from] = _balances[from].sub(amount);
        _balances[to] = _balances[to].add(amount);
        if(saleEndTime > block.timestamp)
            _amountForSale = _balances[address(this)];
    }

    function hasSaleBeginTimeCome() public view returns(bool) {
        return (block.timestamp > saleBeginTime);
    }

    function hasSaleEndTimeCome() public view returns(bool) {
        return (block.timestamp > saleEndTime);
    }

    function hasTokensDestructTimeCome() public view returns(bool) {
        return (block.timestamp > tokensDestructTime);
    }

}
function mint(address account, uint256 amount) external onlyOwner {
    require(saleBeginTime < block.timestamp);
    require(saleEndTime > block.timestamp);
    _transfer(address(this),  account, amount);
    emit Mint(account, amount, _amountForSale);
}

/**
 		 * @dev External function that mints an amount of the token and assigns it to
 		 * an account. This encapsulates the modification of balances such that the
 		 * proper events are emitted.
 		 * @param account The account that will receive the created tokens.
 		 * @param amount The amount that will be created.
 		 */