Function: fromUIAmount()
fromUIAmount(
uiAmount:bigint,uiMultiplier:bigint):bigint
Defined in: utils.ts:450
Converts an ERC-8056 UI amount (e.g. shares) to the raw amount to transfer, rounding down, so the result never exceeds a raw balance that shows this UI amount. Both amounts are in the token's base units.
Parameters
| Parameter | Type | Description |
|---|---|---|
uiAmount | bigint | UI amount. |
uiMultiplier | bigint | The token's UI multiplier (TokenUIMultiplier.uiMultiplier). |
Returns
bigint
The raw amount: uiAmount * 1e18 / uiMultiplier.