parseUnits
parseUnits(
value,decimals?):bigint
Defined in: packages/synapse-core/src/utils/format.ts:28
Parse a value to a bigint.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | number | bigint | Dnum | The value to parse. It can be a string, a number, a bigint, or a dnum. |
decimals? | number | The number of decimals to parse. If not provided, the default is 18. |
Returns
Section titled “Returns”bigint
The parsed value as a bigint.