evm-token-decimals
Prevent silent decimal mismatch bugs across EVM chains. Covers runtime decimal lookup, chain-aware caching, bridged-token precision drift, and safe normalization for bots, dashboards, and DeFi tools. Use when handling token amounts across EVM chains, or when a balance, price, or transfer amount is off by orders of magnitude.
- installs 8w
- 1,709
- 30-day movement
- starts with the next reading
- Related entries
- 5
- Connections
- 0
An agent skill that guides handling ERC-20 token decimals across EVM chains to avoid silent magnitude errors. It covers runtime decimals() lookup, caching by chain and token address, bridged-token precision drift, and decimal-safe normalization in Python, TypeScript, Solidity, and bash.
Reach for it when token balances, prices, or transfer amounts look off by orders of magnitude, or when writing code that touches token amounts on multiple EVM chains.
Use it to
- Query decimals() at runtime instead of hardcoding
- Cache decimals by chain ID and token address
- Normalize amounts to 18-decimal WAD in Solidity
- Compute fiat values from on-chain balances with exact math
- Defensively handle non-standard or old tokens
For Developers building bots, dashboards, and DeFi tools on EVM chains
- Host repository
- affaan-m/ECC
- Version
- 1.0.0
- Installs, lifetime
- 2,900
- Installs, 8 weeks
- 1,709
- Host stars
- 261k
- Host language
- JavaScript