evm-decimal-validation

Validate ERC20 token decimals against on-chain values across EVM chains.

4|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/widnyana/eyay-toolkits --skill evm-decimal-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evm-decimal-validation
Source: https://github.com/widnyana/eyay-toolkits/tree/main/plugins/evm-decimal-validation/skills/evm-decimal-validation
Command: npx skills add https://github.com/widnyana/eyay-toolkits --skill evm-decimal-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents incorrect token amount calculations caused by wrong or hardcoded ERC20 decimals across different EVM chains.

Core Features & Use Cases

  • Audit and validate decimals: Identify hardcoded decimal usage and compare configured values against on-chain decimals() results for each deployment.
  • Per-chain configuration guidance: Update network/token configuration with chain-specific decimals and ensure conversions like FromWei/ToWei use the correct per-chain value.
  • Safety guardrails for common failures: Use sensible fallbacks for unknown chains and add startup validation to detect mismatches before production.

Use case example: You deploy a token to Ethereum, Polygon, and BNB Chain, then your app starts showing balances that are off by orders of magnitude; use this Skill to query actual on-chain decimals and fix each chain’s configuration so all conversions and UI amounts line up.

Quick Start

Run evm-decimal-validation to audit your repo’s decimal usage, query the token contract decimals on your target chains, and update your per-chain configuration so conversions match on-chain reality.

Frequently Asked Questions about evm-decimal-validation

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

FAQPage Schema
Why do ERC20 token balances show incorrect amounts across different EVM chains?

Incorrect ERC20 token balances occur when decimals are hardcoded instead of queried per-chain. Validating EVM token decimals prevents conversion errors by reconciling configuration values against actual on-chain decimals results for each deployment.

How do I audit my repo for hardcoded ERC20 decimals in multi-chain deployments?

Audit hardcoded ERC20 decimals by scanning your codebase for static decimal values and comparing them against on-chain decimals results. This per-chain configuration audit identifies mismatches before they cause token amount conversion errors in production.

How do I handle token decimals for unknown chain IDs during wei conversion?

Handle unknown chain IDs during wei conversion by applying sensible fallbacks for token decimals. This safety guardrail ensures your application uses a default decimal value when querying an unrecognized network, preventing critical conversion failures.

Can I use this to validate Solidity and Go conversion helpers for multi-chain tokens?

Yes, you can validate conversion helpers in Solidity and Go. The process enforces per-chain decimal usage in functions like FromWei and ToWei, ensuring your multi-chain token integration calculates balances and transfers accurately across all deployments.

What is the best way to prevent token amount conversion bugs in ERC20 integrations?

The best way to prevent token amount conversion bugs is querying on-chain decimals dynamically and adding startup validation to detect configuration mismatches. This ensures your ERC20 integration applies the correct per-chain decimals before processing transfers or fees.

When should I add startup validation for ERC20 token decimals?

Add startup validation for ERC20 token decimals before deploying to production. This safety guardrail detects configuration mismatches early, ensuring your multi-chain application enforces correct per-chain decimal usage and prevents transaction calculation errors.