DecimalFixedPoint
A fixed-point number whose scale is a power of 10. The stored raw bigint
represents the mathematical value raw / 10 ** decimals.
Decimal fixed-point is the natural representation for quantities that users reason about in base-10 terms, such as token amounts, currency, or probabilities with decimal precision.
Example
An unsigned 64-bit USDC amount with 6 decimals of precision:
See
Type Parameters
| Type Parameter | Description |
|---|---|
TSignedness extends Signedness | Whether the value can be negative. |
TTotalBits extends number | The total number of bits used to store the raw value. |
TDecimals extends number | The number of decimal digits to the right of the decimal point. |