ethereumjs-monorepo

@ethereumjs/util


@ethereumjs/util / formatBigDecimal

Function: formatBigDecimal()

formatBigDecimal(numerator, denominator, maxDecimalFactor): string

Defined in: packages/util/src/units.ts:14

Formats numerator / denominator as a fixed-point decimal string.

Parameters

numerator

bigint

denominator

bigint

maxDecimalFactor

bigint

Power-of-ten scale for fractional digits (e.g. 1000n → three decimals)

Returns

string