Function: parseUnits()
function parseUnits(value, decimals): bigint;
Defined in: packages/overcast-core/src/assets/index.ts:141
Convert a whole-token (display) decimal string to an exact native integer
bigint. e.g. parseUnits("1.5", 9) → 1_500_000_000n. Throws if the value
is malformed or specifies more fractional digits than decimals supports
(which would silently truncate).
Parameters
| Parameter | Type |
|---|---|
value | string |
decimals | number |
Returns
bigint