Skip to main content
Version: 1.16.1

Function: toUIAmount()

toUIAmount(amount: bigint, uiMultiplier: bigint): bigint

Defined in: utils.ts:438

Converts a raw token amount to its ERC-8056 UI amount (e.g. shares), rounding down. Both amounts are in the token's base units.

Parameters​

ParameterTypeDescription
amountbigintRaw amount, as the token transfers it.
uiMultiplierbigintThe token's UI multiplier (TokenUIMultiplier.uiMultiplier).

Returns​

bigint

The UI amount: amount * uiMultiplier / 1e18.