Skip to main content

Module format

Module format 

Source
Expand description

Shared formatting utilities for consistent presentation across all chains.

Functionsยง

format_large_number
Formats a large number with K, M, B suffixes (no currency prefix).
format_price
A price at the decimals of its own size (price_decimals).
format_price_usd
format_price in USD.
format_token_balance
Formats a raw token balance string with proper decimals and K/M/B suffixes.
format_usd
price_decimals
Formats a USD value with K, M, B suffixes.