Skip to content

docs: add Arc Relay Bridge ecosystem documentation#79

Open
osr21 wants to merge 6 commits into
circlefin:mainfrom
osr21:docs/arc-relay-bridge
Open

docs: add Arc Relay Bridge ecosystem documentation#79
osr21 wants to merge 6 commits into
circlefin:mainfrom
osr21:docs/arc-relay-bridge

Conversation

@osr21
Copy link
Copy Markdown

@osr21 osr21 commented May 24, 2026

Summary

Adds developer documentation for Arc Testnet from real-world DApp integration experience.
All findings come from building Arc Relay Bridge
a cross-chain USDC bridge on Circle's CCTP V2 — and are verified against the live testnet.


Files added / updated

File Description
docs/ecosystem/arc-relay-bridge.md Full ecosystem reference for the Arc Relay Bridge project
docs/cctp-v2.md Arc-specific CCTP V2 integration guide — nonce encoding, gas workarounds, attestation timing, RPC gotchas
docs/dapp-development.md New — practical DApp developer guide: MetaMask integration, RPC CORS, USDC decimals, gas quirks, eth_getLogs pagination, EIP-2612 permit
docs/contract-verification.md New — step-by-step contract verification on ArcScan (Blockscout) for both Hardhat and Foundry

Why this is useful for Arc developers

docs/dapp-development.md documents every friction point encountered when building a
browser DApp on Arc Testnet:

  • wallet_switchEthereumChain fails silently — must use wallet_addEthereumChain unconditionally (tracks #89)
  • Public RPC missing CORS headers — use arc-testnet.drpc.org in browser DApps (tracks #90)
  • USDC has 6 decimals for ERC-20 ops, 18 decimals for gas — undocumented, causes silent value bugs (tracks #91)
  • eth_estimateGas unreliable — always supply explicit gasLimit: 600_000n (tracks #80)
  • Gas price stale baseline — apply ≥30% premium for back-to-back transactions (tracks #87)
  • eth_getLogs times out for wide block ranges — paginate at ≤10,000 blocks (tracks #83)
  • EIP-2612 permit works on Arc USDC — working ethers.js v6 snippet included (tracks #93)
  • MetaMask nativeCurrency must use symbol: "ETH" / decimals: 18 despite USDC as gas (tracks #95)
  • wallet_watchAsset required to show USDC in MetaMask token list (tracks #96)

docs/contract-verification.md documents the entire ArcScan verification flow that
currently requires reverse-engineering:

  • Blockscout API URL (testnet.arcscan.app/api)
  • Hardhat etherscan.customChains block with dummy API key
  • Foundry foundry.toml equivalent
  • Manual verification via ArcScan UI
  • Blockscout REST API for programmatic verification
  • The bytecode-must-match-exactly constraint and why source can become unrecoverable
  • Testnet and Mainnet entries (tracks #84)

docs/cctp-v2.md covers Arc-specific CCTP V2 behaviors not visible in Circle's docs:

  • Arc nonce encoding (bytes32 always zero, not uint64)
  • 7-param depositForBurn requirement (selector 0x8e0250ee)
  • minFinalityThreshold: 2000 (finalized) for Arc vs 1000 (safe) for other chains
  • Gas estimation bug + waitWithRetry pattern for polling
  • RPC endpoint selection for browser DApps

Built with: React 19 + Vite + ethers.js v6 + Circle Iris API sandbox

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