Skip to content

fix(arc-testnet): correct nativeCurrency decimals from 6 to 18#21

Closed
Sertug17 wants to merge 1 commit into
circlefin:masterfrom
Sertug17:fix/native-currency-decimals
Closed

fix(arc-testnet): correct nativeCurrency decimals from 6 to 18#21
Sertug17 wants to merge 1 commit into
circlefin:masterfrom
Sertug17:fix/native-currency-decimals

Conversation

@Sertug17

@Sertug17 Sertug17 commented May 18, 2026

Copy link
Copy Markdown

Summary

lib/circle/gateway-sdk.ts:47 defines Arc Testnet's native currency as:

nativeCurrency: { name: 'USD Coin', symbol: 'USDC', decimals: 6 }

However, Arc Testnet uses USDC as native gas with 18 decimals, while ERC-20 USDC uses 6. Because viem's chain config treats nativeCurrency.decimals as the value used for formatEther / formatUnits defaults and balance calculations, balances displayed via this chain config will be off by 10^12.

Verification

The same chain config pattern was identified and corrected in arc-multichain-wallet#37 by @Ccheh, where the same fix was applied alongside additional corrections.

Change

-  nativeCurrency: { name: 'USD Coin', symbol: 'USDC', decimals: 6 },
+  nativeCurrency: { name: 'USDC', symbol: 'USDC', decimals: 18 },

The name field was also updated from 'USD Coin' to 'USDC' for consistency with the symbol field (matching the change made in arc-multichain-wallet#37).

Notes

  • Single-line change (1 file, +1/-1).
  • This PR is independent of #9 by @skyc1e, which addresses the explorer URL inconsistency on a different line in the same file.
  • The chain config appears to be copied across sample apps; same fix should be checked in any other apps using this template.

@Sertug17 Sertug17 changed the title fix: correct Arc Testnet native currency decimals fix(arc-testnet): correct nativeCurrency decimals from 6 to 18 May 21, 2026
@Sertug17

Copy link
Copy Markdown
Author

Closing this in favor of #19 by @Ccheh — I missed that PR while
reviewing the repo, my apologies for the duplication.

#19 covers the same decimals: 6 → 18 fix on the same line,
plus the broken explorer URL on the next line (explorer.arc.testnet.circle.com
testnet.arcscan.app) — it's the more complete PR and
should be the one merged.

Apologies @Ccheh — your PR is the right one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant