evm-token-decimals

Look up ERC-20 token decimals and normalize balances to 18-decimal wad.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/sakamoto-family-smile/agent_monorepo --skill evm-token-decimals-sakamoto-family-smile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evm-token-decimals
Source: https://github.com/sakamoto-family-smile/agent_monorepo/tree/main/.claude/skills/ecc/evm-token-decimals
Command: npx skills add https://github.com/sakamoto-family-smile/agent_monorepo --skill evm-token-decimals-sakamoto-family-smile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Silent decimal mismatches across EVM chains can cause balances or fiat values to be off by orders of magnitude if decimals are ignored or misread.

Core Features & Use Cases

  • Runtime decimal lookup for ERC20 tokens across chains
  • Chain-aware caching to avoid repeated decimals() calls
  • Defensive handling for bridged tokens with precision drift
  • Normalization to a common 18-decimal wad for consistent accounting in bots, dashboards, and DeFi tools
  • Use cases: price feeds, portfolio trackers, and on-chain analytics with reliable token decimals

Quick Start

Query the token's decimals() for a token on a target chain and apply 18-decimal normalization in your calculations.

Frequently Asked Questions about evm-token-decimals

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

FAQPage Schema
Why do my EVM token balances show mispricing or errors across different chains?

Silent decimal mismatches across EVM chains cause balance and fiat value errors by orders of magnitude when on-chain ERC-20 token decimals are ignored or misread during calculations.

How do I normalize on-chain ERC-20 token decimals for consistent DeFi accounting?

Normalize on-chain ERC-20 token decimals by querying the token's decimals() on the target chain and converting all values to a common 18-decimal wad for consistent accounting in bots and dashboards.

Can I use chain-aware caching to avoid repeated decimals() calls for EVM tokens?

Yes, chain-aware caching prevents repeated decimals() calls for EVM tokens by storing runtime decimal lookups locally, reducing RPC requests while maintaining accurate on-chain token data.

How do you handle precision drift for bridged tokens across EVM networks?

Handle precision drift for bridged tokens across EVM networks by applying defensive fallbacks and re-querying decimals after bridging events to ensure accurate normalization.

When do I need to re-query token decimals after cross-chain bridging events?

Re-query token decimals after cross-chain bridging events when bridged tokens exhibit precision drift, ensuring your on-chain analytics correctly recalculates the 18-decimal wad normalization.

Does normalizing token decimals to an 18-decimal wad work for portfolio trackers?

Normalizing token decimals to an 18-decimal wad works for portfolio trackers and price feeds by providing consistent accounting logic across multiple EVM chains despite varying token precision.