Expand description
Common Currency constants.
Precision and metadata references:
- ISO 4217 Maintenance Agency dataset (https://github.com/datasets/currency-codes): authoritative alphabetic codes, numeric codes, and minor units for fiat and commodity-backed entries.
- Cardano ledger documentation (https://docs.cardano.org/native-tokens/understanding-assets): 1 ADA = 1,000,000 lovelace, underpinning the six-decimal crypto precision we retain.
- XRPL documentation on drops (https://xrpl.org/xrp-ledger-tokens.html#drops-and-xrp): 1 XRP = 1,000,000 drops, confirming the six-decimal allowance for XRP.
- Tezos protocol reference (https://tezos.gitlab.io/active/numismatics.html): 1 tez = 1,000,000 mutez, informing the six-decimal precision for XTZ.
- Stablecoin contract metadata for USDC, USDP, BRZ, and USDG (e.g. https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48#readContract, https://etherscan.io/token/0x8e870d67f660d95d5be530380d0ec0bd388289e1#readContract, https://etherscan.io/token/0x01d33fd36ec67c6ada32cf36b31e88ee190b1839#readContract, https://github.com/paxosglobal/usdg-contract/blob/5afb581e076f69ae46eb2e360f4dc63a71514a78/contracts/USDG.sol): each exposes 6-18 on-chain decimals; we clamp to an 8-decimal internal default.
Staticsยง
- CURRENCY_
MAP - A map of built-in
Currencyconstants.