evm-token-decimals

Retrieve token decimals at runtime across EVM chains with caching.

1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/zero3041/PREP --skill evm-token-decimals-zero3041
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evm-token-decimals
Source: https://github.com/zero3041/PREP/tree/main/.claude/skills/skills/evm-token-decimals
Command: npx skills add https://github.com/zero3041/PREP --skill evm-token-decimals-zero3041

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires web3.js, ethers.js, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents silent decimal mismatches across EVM chains, ensuring accurate token balances and fiat values.

Core Features & Use Cases

  • Runtime Decimal Lookup: Dynamically retrieves token decimals at runtime.
  • Chain-Aware Caching: Caches decimals by chain and token address for efficiency.
  • Bridged-Token Precision: Handles precision drift in bridged tokens.
  • Safe Normalization: Provides safe normalization for bots, dashboards, and DeFi tools.
  • Use Case: For example, when calculating fiat values from on-chain balances or comparing token amounts across multiple EVM chains.

Quick Start

Use the evm-token-decimals skill to get the decimals of a token on a specific chain.

Frequently Asked Questions about evm-token-decimals

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

FAQPage Schema
Why do my token balances show incorrect values across multiple EVM chains?

Incorrect token balances across EVM chains often result from silent decimal mismatches. This Skill corrects precision drift by dynamically retrieving token decimals at runtime, ensuring accurate balance normalization and fiat value calculations.

How do I handle decimal mismatches for bridged tokens in DeFi bots?

To handle decimal mismatches for bridged tokens in DeFi bots, you need safe normalization that accounts for precision drift. This Skill provides runtime decimal lookup and chain-aware caching to ensure bots process bridged-token amounts accurately.

Does this decimal lookup tool work with both ethers.js and web3.js?

Yes, this decimal lookup tool works with both ethers.js and web3.js. It requires either library to interact with smart contracts for dynamically retrieving and caching token decimals across different EVM chains.

What is the best way to retrieve token decimals dynamically without hardcoding?

The best way to retrieve token decimals dynamically without hardcoding is using a runtime lookup mechanism. This Skill queries smart contracts on-chain and caches decimals by chain and token address for efficient subsequent reads.

When should I worry about token precision drift affecting my DeFi dashboard?

You should worry about token precision drift when your DeFi dashboard aggregates balances or calculates fiat values across multiple EVM chains. Bridged tokens are especially prone to this, requiring safe normalization to prevent silent calculation errors.