docs: add Arc contract deployment notes#151
Conversation
|
Here's what we found deploying and verifying three contracts on Arc Testnet with Foundry — happy to have any of this incorporated. Foundry config (
|
| Item | Value |
|---|---|
| Chain ID | 5042002 (0x4cef52) |
| RPC | https://rpc.testnet.arc.network |
| Explorer | https://testnet.arcscan.app |
| USDC (native gas) | 0x3600000000000000000000000000000000000000 |
| EURC | 0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a |
| CCTP Domain | 26 |
| TokenMessengerV2 | 0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA |
| MessageTransmitterV2 | 0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275 |
Reference implementation with full deploy + verify setup: osr21/arc-stablecoin-dapp.
|
The updated doc incorporates the earlier deployment notes well. A few remaining gaps from our deployment experience that are worth adding: 1. The current verify commands are: forge verify-contract \
--verifier blockscout \
--verifier-url "https://testnet.arcscan.app/api/" \
--compiler-version 0.8.20 \
--chain 5042002 \
<contract-address> src/<Contract>.sol:<Contract>Blockscout recompiles the submitted source to confirm the bytecode matches what's on-chain. Without forge verify-contract \
--verifier blockscout \
--verifier-url "https://testnet.arcscan.app/api/" \
--compiler-version 0.8.20 \
--evm-version paris \
--chain 5042002 \
<contract-address> src/<Contract>.sol:<Contract>This is the most common reason Arcscan verification silently succeeds (returns 200) but the contract never shows as verified. 2. Arc native USDC has a decimal split — the quick-reference table should note it The table lists
Calling | Native USDC / gas | 3. As currently written, # via_ir = true # Uncomment only if your contract hits the stack-depth limit.
# Significantly increases compile time.4. Both verify examples hardcode |
|
All four points addressed:
Doc is in good shape. No further issues from this review thread. |
Findings from Arc Relay Bridge deployment (Paymaster, GasRelayer, FeeRouter, YieldVault — all four chains)This issue covers the deployment guide gap well. Adding three hard-won findings from deploying four contracts across Arc Testnet, Sepolia, Base Sepolia, and Fuji that aren't documented anywhere and each cost significant debug time. 1.
|
| Format | Endpoint | Result |
|---|---|---|
| Flat source (v1) | POST /api?module=contract&action=verifysourcecode |
"Missing codeformat field" — even when codeformat is present |
| JSON body (v2) | POST /api/v2/smart-contracts/{addr}/verification/via/flattened-code |
"Bad request" |
| Multipart file (v2) | same v2 endpoint with -F files[]=@... |
"Bad request" |
hardhat verify |
uses v1 under the hood | same "Missing codeformat field" |
forge verify-contract |
Blockscout-compatible mode | same v1 failure |
The only working path is the Arcscan UI (Contract → Verify & Publish → Solidity single file). This doesn't scale for multi-contract or multi-chain deployments.
Either the Blockscout instance at testnet.arcscan.app has verification disabled at the API layer, or it expects a non-standard field that isn't documented. Would be helpful to:
- Confirm whether programmatic API verification is intentionally disabled
- If not, expose the correct field names / format
- Add a
verifyOnBlockscoutHardhat plugin config example that actually works
Summary
evmVersion: "paris"for Solidity/Foundry deployments to avoid newer-opcode compatibility issues@nomicfoundation/hardhat-verifycustomChains example for Arcscan/Blockscout verificationRelated issues
Validation
npx prettier --check README.md docs/deploying-contracts.mdgit diff --check