Skip to content

Add Arc support - #1106

Open
j0ntz wants to merge 2 commits into
masterfrom
jon/arc-chain
Open

j0ntz wants to merge 2 commits into
masterfrom
jon/arc-chain

Conversation

@j0ntz

@j0ntz j0ntz commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

Adds Arc (arc), Circle's EVM chain 5042 with USDC as its gas token. History comes from the existing Alchemy key.

Asana: https://app.asana.com/0/1215088146871429/1218563157181138

Arc's native balance is USDC at 18 decimals, and 0x3600000000000000000000000000000000000000 is an ERC-20 view of that same balance at 6 decimals. A transfer through that contract moves native USDC, but Alchemy reports it only as an erc20 row on 0x3600, never as external or internal. Bridges deliver this way. The LI.FI funding receive in testing (0x223aa302…) exists on Alchemy only as a 0x3600 row; without the handling below, the wallet showed the balance with an empty history.

  • nativeErc20Interface: a new network option naming that contract and its precision. A native Alchemy sync also reads the contract's transfers in both directions, scales them to 18 decimals, and sums them with the transaction's other native rows. scaleInterfaceTransfers is unit-tested with a real Arc transaction's values.
  • No 0x3600 token: listed as a token, it would show the same money twice.
  • History source: Alchemy only. Etherscan V2 serves chain 5042, but its lists miss interface transfers, and a fallback there would store incomplete history.
  • Built-in tokens: EURC and cirBTC, each checked against the contract's name, symbol and decimals. USYC is left out (permissioned yield token).
  • Fees: the base fee holds near 20 gwei, about $0.0004 per transfer; priority fee floor 1 gwei.

Tested on the iOS sim with this branch's bundle (screenshots below): wallet creation, a LI.FI swap into Arc, a LI.FI swap out of Arc (approval plus swap), and a plain send. Each was checked against Alchemy and the chain.

Companion PRs: jon/arc-chain in edge-react-gui, edge-exchange-plugins and edge-rates-server.


Note

Medium Risk
Shared EVM history adapters gain new merge paths that affect reported native amounts and fees; mistakes would show wrong history, though behavior is gated on the new optional network flag and covered by tests.

Overview
Adds Arc (arc, EVM chain 5042) as a USDC-native wallet plugin (Alchemy/RPC/Etherscan V2 adapters, built-in EURC and cirBTC, explorers and fees tuned for Arc). The native USDC interface at 0x3600…0000 is intentionally not a separate token so balances are not double-counted.

Introduces optional nativeErc20Interface on EVM network info for chains where native value moves only through an ERC-20 view at different decimals. Alchemy and EvmScan native history sync now also pull those contract transfers, scale amounts to native units, and merge them with regular/internal rows (EvmScan zeroes interface row gas so fees are not duplicated). EvmScan URL selection for token vs regular lists now keys off contractAddress rather than tokenId.

Unit tests cover scaling/merging for both adapters using real Arc-style transaction data.

Reviewed by Cursor Bugbot for commit 4856604. Bugbot is set up for automated code reviews on this repo. Configure here.

Test evidence

4856604
Add Arc support

arc in create wallet

arc balance after funding

arc history send swap approval receive

arc wallet usdc symbol

arc send confirm

arc send result

arc history after keyless resync

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f49f9a7. Configure here.

Comment thread src/ethereum/info/arcInfo.ts
Comment thread src/ethereum/info/arcInfo.ts
Arc's native USDC has an optional ERC-20 view at 0x3600...0000 with 6
decimals of precision against the native 18. A transfer through that
contract moves the native balance, but Alchemy reports it only as an
erc20 row on the contract, and Etherscan only in tokentx, never as an
external or internal transfer, so native history missed it.

A network can now name that contract as nativeErc20Interface. A native
sync on the Alchemy or evmscan adapter also reads the contract's
transfers, scales each value to the native denomination, and sums them
with the transaction's other native rows. The evmscan rows carry a zero
gas price, since the same transaction's txlist row already has the fee.
Arc is Circle's EVM chain (5042) with USDC as its gas token. The native
balance carries 18 decimals; USDC at 0x3600...0000 is an ERC-20 view of
that same balance at 6 decimals, so it is named as the network's
nativeErc20Interface rather than listed as a token, which would show the
same money twice.

History comes from Alchemy, with Etherscan V2 as the fallback and the
only source in a build without an Alchemy key; both fold in interface
transfers. EURC and cirBTC are the built-in tokens, each checked against
the contract's name, symbol and decimals. The base fee holds near 20
gwei.
@j0ntz

j0ntz commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Description update for 4856604: the "History source" bullet above is superseded. Arc's history comes from Alchemy with Etherscan V2 as the fallback, and Etherscan is the only source in a build without an Alchemy key. Both adapters fold in transfers through the 0x3600 interface: the evmscan native sync reads the interface's tokentx rows, restates them in native units, and zeroes their gas price so the merge with the signer's txlist row counts the fee once (asNativeInterfaceTransaction, tested with the real rows of Arc tx 0xf4a07658…).

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