evm-token-decimals

Read token decimals and normalize amounts to 18 decimals across EVM chains.

86|21|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Jamkris/everything-gemini-code --skill evm-token-decimals-jamkris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evm-token-decimals
Source: https://github.com/Jamkris/everything-gemini-code/tree/main/skills/evm-token-decimals
Command: npx skills add https://github.com/Jamkris/everything-gemini-code --skill evm-token-decimals-jamkris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Silent decimal mismatches across EVM chains cause balances and USD values to drift, undermining reliability in DeFi tooling and analytics.

Core Features & Use Cases

  • Runtime decimals() lookups to fetch token decimals on demand
  • Chain-aware caching keyed by (chain_id, token_address) to reduce repeated calls
  • Normalization to 18 decimals for consistent cross-chain accounting
  • Defensive handling for tokens with non-standard decimals and bridge scenarios
  • Suitable for bots, dashboards, and portfolio trackers across multi-chain ecosystems

Quick Start

Check decimals for a token on a specific chain and normalize a balance to 18 decimals for consistent pricing.

Frequently Asked Questions about evm-token-decimals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do EVM token balances and USD values drift across different chains?

EVM token balances drift across chains due to silent decimal mismatches when tooling assumes default decimals instead of querying the actual token contract. Normalizing all amounts to 18 decimals ensures consistent cross-chain accounting and pricing.

How do I normalize EVM token balances to 18 decimals for cross-chain comparisons?

You normalize EVM token balances by performing runtime decimals() lookups on the token contract, then converting the raw amounts to a standard 18 decimals. This creates consistent cross-chain comparisons for DeFi analytics and portfolio tracking.

How can I reduce RPC load when fetching token decimals repeatedly in web3 applications?

You reduce RPC load by implementing chain-aware caching keyed by chain_id and token_address. This stores fetched token decimals locally, eliminating redundant RPC calls and significantly speeding up repeated web3 lookups.

Does this approach to EVM token decimals handle non-standard tokens and bridge scenarios?

Yes, this approach includes defensive handling specifically designed for tokens with non-standard decimals and bridge scenarios. It reliably reads and caches the correct decimals across multi-chain ecosystems to prevent calculation errors.

Can I use EVM token decimal normalization for multi-chain portfolio trackers and bots?

Yes, this decimal normalization is suitable for bots, dashboards, and portfolio trackers operating across multi-chain ecosystems. It ensures reliable balance reporting and pricing by resolving silent decimal mismatches across EVM chains.

What is the best way to standardize token decimals across multiple EVM chains?

The best way to standardize token decimals across multiple EVM chains is to fetch them on demand via runtime lookups and normalize all amounts to 18 decimals. Caching these values by chain_id and token_address optimizes performance.