fix(arc-testnet): correct native token symbol, decimals, and explorer URL - #37
fix(arc-testnet): correct native token symbol, decimals, and explorer URL#37Ccheh wants to merge 2 commits into
Conversation
|
+1 verified all three fixes locally on a fresh clone: 1. 2. 3. Explorer URL ✅ $ curl -I https://explorer.arc.testnet.circle.com
HTTP 000 (connection failed)
$ curl -I https://testnet.arcscan.app
HTTP/2 2004. Cross-repo contextThe same explorer URL pattern was identified and is being fixed in Nice clean PR 👍 hopefully gets a review soon. |
Three real chain-configuration bugs that affect any developer forking this sample:
1.
lib/chain-config.ts— wrong native token symbol```diff
export const NATIVE_TOKENS: Record<string, string> = {
avalancheFuji: "AVAX",
baseSepolia: "ETH",
};
```
There is no "ARC" token. Arc's documented core property is USDC is the native gas token (see Circle skills
use-arc/SKILL.md: "Arc is Circle's blockchain where USDC is the native gas token").This value flows directly into three user-visible error messages in
components/transfer-form.tsx(lines 79, 81, 83, 92, 94, 96, 97), telling users to acquire a non-existent "ARC" token to pay gas. A new user hitting the gas-insufficient path is directed to find "ARC" on Arc Testnet, which doesn't exist — they should be sent to the Circle Faucet to get USDC.2.
lib/circle/gateway-sdk.ts— wrong native decimals```diff
```
Arc's native gas token uses 18 decimals (like ETH on other EVM chains), not 6. ERC-20 USDC at
0x3600...has 6 decimals as a view, but the chain-levelnativeCurrency.decimalsin a viem/wagmiChaindefinition refers to native gas, which is 18 on Arc. This is explicitly documented inuse-arc/SKILL.md:Empirical confirmation: the canonical
Chaindefinition incirclefin/arc-commerce/lib/wagmi/config.tsusesdecimals: 18. The current value of 6 causes viem/wagmi balance display to be off by a factor of10^12— a 1.0 USDC balance shows as1,000,000,000,000in any component that readsformatEther/formatUnitsagainst thisnativeCurrency.3.
lib/circle/gateway-sdk.ts— broken block explorer URL```diff
```
explorer.arc.testnet.circle.comreturns HTTP 000 (DNS does not resolve). The canonical Arc Testnet explorer istestnet.arcscan.app(referenced incirclefin/skills/use-arc/SKILL.md,circlefin/arc-fintech/lib/constants/block-explorers.ts, andcirclefin/arc-commerce/components/wallet/network-indicator.tsx).```bash
$ curl -sI -o /dev/null -w "%{http_code}\n" "https://explorer.arc.testnet.circle.com"
000
$ curl -sI -o /dev/null -w "%{http_code}\n" "https://testnet.arcscan.app"
200
```
Any "View on Explorer" link rendered from this chain config currently 404s.
These are the same kind of chain-config inheritance bugs
circlefin/arc-fintechcarries (filing a separate PR there). Fixing the sample apps prevents the bugs from propagating into every downstream fork that uses these as templates.