Skip to content

parseUnits

parseUnits(value, decimals?): bigint

Defined in: packages/synapse-core/src/utils/format.ts:28

Parse a value to a bigint.

ParameterTypeDescription
valuestring | number | bigint | DnumThe value to parse. It can be a string, a number, a bigint, or a dnum.
decimals?numberThe number of decimals to parse. If not provided, the default is 18.

bigint

The parsed value as a bigint.