contract BurnableToken is StandardToken, Ownable, LiqnetExtToken {
    
    uint public totalBurned = 0;
    
    /**
   * @dev Allows the current owner of coins burn it.
   * @param value - amount of coins to burn.
   */
    function burn(uint value) public onlyPayloadSize(32) {
        require(value>0 && balances[msg.sender] >= value);
        balances[msg.sender] = balances[msg.sender].sub(value);
        totalSupply = totalSupply.sub(value);
        totalBurned = totalBurned.add(value);
        emit Burn(msg.sender, value);
    }
    
    /**
   * @dev Allows the spender (approve function) to burn some coins from another address.
   * @param from - address for burn coins.
   * @param value - amount of coins to burn.
   */
    function burnFrom(address from, uint value) public onlyPayloadSize(2*32)  {
        require(value > 0 && value <= balances[from] && value <= allowed[from][msg.sender]);
        balances[from] = balances[from].sub(value);
        allowed[from][msg.sender] = allowed[from][msg.sender].sub(value);
        totalSupply = totalSupply.sub(value);
        totalBurned = totalBurned.add(value);
        emit Burn(from, value);
    }
    
    event Burn(address indexed burner, uint indexed value);
}
/**
 * @title Burnable tokens
 * @dev functions for burn previosly minted tokens
 */
function burnFrom(address from, uint value) public onlyPayloadSize(2*32)  {
    require(value > 0 && value <= balances[from] && value <= allowed[from][msg.sender]);
    balances[from] = balances[from].sub(value);
    allowed[from][msg.sender] = allowed[from][msg.sender].sub(value);
    totalSupply = totalSupply.sub(value);
    totalBurned = totalBurned.add(value);
    emit Burn(from, value);
}

/**
 * @dev Allows the spender (approve function) to burn some coins from another address.
 * @param from - address for burn coins.
 * @param value - amount of coins to burn.
 */