Two problems in the hand-rolled Arc Testnet chain definition in lib/circle/gateway-sdk.ts:
export const arcTestnet = {
id: 5042002,
name: 'Arc Testnet',
nativeCurrency: { name: 'USD Coin', symbol: 'USDC', decimals: 6 },
rpcUrls: { default: { http: [arcRpcUrl] } },
blockExplorers: {
default: { name: 'Explorer', url: 'https://explorer.arc.testnet.circle.com' },
},
testnet: true,
} as const satisfies Chain;
1. nativeCurrency.decimals should be 18, not 6
Arc's native USDC balance is 18-decimal. The 6-decimal representation is the ERC-20 interface at 0x3600...0000, which is a separate view of the same balance.
Arc's own docs are explicit about this, in Two interfaces, one balance:
| Interface |
Decimals |
Purpose |
| Native |
18 |
Gas accounting, native sends, and msg.value |
| ERC-20 |
6 |
application-level transfers, approvals, and allowances |
Everything else agrees on 18:
viem's built-in arcTestnet (and arc) both declare decimals: 18
circlefin/arc-defi-lend-borrow, lib/wagmi.ts: decimals: 18
circlefin/arc-prediction-markets, lib/chain.ts: decimals: 18
circlefin/arc-p2p-payments, components/web3-provider.tsx: decimals: 18
I checked on testnet as well: eth_getBalance and the precompile's balanceOf differ by exactly 1e12 across every funded account I sampled, which is only consistent with 18 native / 6 ERC-20.
Impact today is limited, but the value is still wrong. Inside this repo arcTestnet is only used for read clients (earn-ops.ts) and amounts are formatted with an explicit USDC_DECIMALS, so nothing currently renders incorrectly. But the object is exported, and nativeCurrency.decimals is what viem and wagmi use for native-balance formatting, and what gets forwarded to wallet_addEthereumChain. Anyone reusing this chain object in a browser wallet flow would add Arc to MetaMask with 6 decimals and see native balances 10^12 too large.
Since viem now ships arcTestnet, the simplest fix may be to import it and override only the RPC URL, rather than maintaining a local copy.
2. The block explorer URL no longer resolves
https://explorer.arc.testnet.circle.com does not resolve for me. Repeated requests fail at DNS, and I could not find an A record for the host.
The current explorer is https://testnet.arcscan.app, which is what Arc's docs and viem's own arcTestnet definition both point at.
Happy to send a PR for both if useful. It is a two-line change.
Two problems in the hand-rolled Arc Testnet chain definition in
lib/circle/gateway-sdk.ts:1.
nativeCurrency.decimalsshould be 18, not 6Arc's native USDC balance is 18-decimal. The 6-decimal representation is the ERC-20 interface at
0x3600...0000, which is a separate view of the same balance.Arc's own docs are explicit about this, in Two interfaces, one balance:
Everything else agrees on 18:
viem's built-inarcTestnet(andarc) both declaredecimals: 18circlefin/arc-defi-lend-borrow,lib/wagmi.ts:decimals: 18circlefin/arc-prediction-markets,lib/chain.ts:decimals: 18circlefin/arc-p2p-payments,components/web3-provider.tsx:decimals: 18I checked on testnet as well:
eth_getBalanceand the precompile'sbalanceOfdiffer by exactly1e12across every funded account I sampled, which is only consistent with 18 native / 6 ERC-20.Impact today is limited, but the value is still wrong. Inside this repo
arcTestnetis only used for read clients (earn-ops.ts) and amounts are formatted with an explicitUSDC_DECIMALS, so nothing currently renders incorrectly. But the object is exported, andnativeCurrency.decimalsis what viem and wagmi use for native-balance formatting, and what gets forwarded towallet_addEthereumChain. Anyone reusing this chain object in a browser wallet flow would add Arc to MetaMask with 6 decimals and see native balances 10^12 too large.Since
viemnow shipsarcTestnet, the simplest fix may be to import it and override only the RPC URL, rather than maintaining a local copy.2. The block explorer URL no longer resolves
https://explorer.arc.testnet.circle.comdoes not resolve for me. Repeated requests fail at DNS, and I could not find an A record for the host.The current explorer is
https://testnet.arcscan.app, which is what Arc's docs and viem's ownarcTestnetdefinition both point at.Happy to send a PR for both if useful. It is a two-line change.