• Rounds a number to the specified set of decimals. If decimals is undefined, the amount will be returned as is

    See

    formatFixedDecimals , this function fulfils a similar purpose but cuts off trailing zeroes in decimals, and also throws when decimals is undefined

    Returns

    value rounded to the number of decimals specified

    Parameters

    • value: Value

      BigNumberish

    • decimals: number

      number of decimals

    Returns string

Generated using TypeDoc