def format_amount(num: str):
    """Format a float string to an integer with 18 decimals.

    Example:
        '2.3' -> 2300000000000000000

    """
    periode = num.find('.')
    if periode == -1:
        return int(num) * 10**18
    decimals = 0
    for i, digit in enumerate(num[periode + 1:]):
        decimals += int(digit) * 10**(17 - i)
    return int(num[:periode]) * 10**18 + decimals