Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 7.28 KB

File metadata and controls

27 lines (23 loc) · 7.28 KB

Native currency precision

decimals is the exponent in 1 whole native unit = 10^decimals base units. It belongs to the currency, not the address family. eCash is the useful counterexample: XEC has two decimal places despite sharing Bitcoin's UTXO ancestry. Avalanche here means AVAX on the C-Chain; this metadata does not describe its X/P chains.

These references were checked on 2026-09-05. Tests pin the values independently of the classes. No network request is needed at runtime or during tests.

Chain Decimals Reference
Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Avalanche C-Chain, Fantom, Gnosis, Linea, zkSync, Scroll, Berachain 18 ethereum-lists/chains, nativeCurrency.decimals in eip155-{1,8453,42161,10,137,56,43114,250,100,59144,324,534352,80094}.json, respectively
Bitcoin 8 Bitcoin Core COIN, 100,000,000 satoshis
Litecoin 8 Litecoin COIN, 100,000,000
Pepecoin 8 Pepecoin COIN, 100,000,000; native PEP, not an ERC-20 token
eCash 2 eCash build documentation, 100 satoshis per XEC
Cardano 6 Cardano denominations, 1,000,000 lovelace per ADA
Solana 9 Solana account structure, 1,000,000,000 lamports per SOL
Stellar 7 Stellar asset precision, 10,000,000 stroops per XLM
XRP Ledger 6 XRP currency format, 1,000,000 drops per XRP
Aptos 8 AptosCoin initialization, decimals = 8
Sui 9 SUI module, 1,000,000,000 mist per SUI
TON 9 TON Core conversion, 1,000,000,000 nano units per TON
TRON 6 TRX denominations, 1,000,000 sun per TRX
Octra 6 Octranomics, 1,000,000 operational units per OCT
Arweave 12 Arweave debugging guide, 1,000,000,000,000 Winston per AR
Monero 12 Monero configuration, CRYPTONOTE_DISPLAY_DECIMAL_POINT = 12
Decred 8 Decred AtomsPerCoin, 100,000,000 atoms

Custom Chain subclasses may omit decimals. That means unknown, never a default of 18; 0 is a valid value for an indivisible currency. Existing subclasses and ChainInfo objects still compile without adding the field.