Skip to content

docs: ERC-4337 Account Abstraction developer guide for Arc Testnet#114

Open
osr21 wants to merge 1 commit into
circlefin:mainfrom
osr21:docs/erc-4337-on-arc-testnet
Open

docs: ERC-4337 Account Abstraction developer guide for Arc Testnet#114
osr21 wants to merge 1 commit into
circlefin:mainfrom
osr21:docs/erc-4337-on-arc-testnet

Conversation

@osr21
Copy link
Copy Markdown

@osr21 osr21 commented Jun 3, 2026

Summary

Adds docs/erc-4337.md — a comprehensive developer guide for building ERC-4337 account abstraction applications on Arc Testnet.

This guide was produced from hands-on experience deploying and debugging ERC-4337 Paymasters on Arc Testnet. It documents three Arc-specific constraints that have silent failure modes (no helpful revert, just zero bytecode or rejected UserOps), which are not currently covered in the Arc docs.

What's new

docs/erc-4337.md covers:

Arc-specific constraints (the critical stuff)

Constraint Symptom if missed Fix
No PUSH0 opcode Deployment mines but cast code returns 0x Compile with evmVersion: "paris" in Hardhat/Foundry/solc
Two-immutable constructor reverts Same silent zero-bytecode failure Keep entryPoint as constant, not immutable
nonReentrant on validatePaymasterUserOp Bundler silently drops UserOp, no on-chain error Remove it; onlyEntryPoint is sufficient under ERC-7562

General ERC-4337 on Arc

  • EntryPoint v0.7 address and how to verify it's live
  • Pimlico bundler setup for chain ID 5042002
  • Smart account deployment and funding via permissionless.js
  • USDC-as-gas decimal handling: 18-decimal native Wei vs 6-decimal ERC-20 — with the conversion formula (÷ 1e12)
  • USDC Paymaster pattern with a reservation system (locked[user]) for concurrent UserOps
  • ERC-7562 storage restriction rules for unstaked Paymasters
  • Deterministic finality and CCTP minFinalityThreshold guidance (Arc = 2000 / finalized)
  • Full worked example: batched approve + depositForBurn (CCTP V2) in a single gasless UserOp
  • Debugging checklist covering all known silent failure modes

Why this matters

Arc's USDC-as-gas model makes ERC-4337 Paymasters particularly compelling — users can bridge, swap, and transact with zero native token holdings. But the three Arc-specific deployment constraints aren't documented anywhere, and each one produces a silent failure that is very difficult to diagnose without prior knowledge.

Testing

The contracts, addresses, and code samples in this guide were validated against the live Arc Testnet (5042002) running multiple bridge UserOps through Pimlico's bundler.

Covers the three Arc-specific constraints:
- Compile with evmVersion: "paris" (no PUSH0 on Arc Testnet)
- Keep entryPoint as constant to avoid 0x60c0 silent revert
- No nonReentrant on validatePaymasterUserOp (ERC-7562)

Also documents:
- USDC-as-gas decimal handling (18-dec native vs 6-dec ERC-20)
- EntryPoint v0.7 address and Pimlico bundler setup
- USDC Paymaster pattern with reservation system
- Deterministic finality and CCTP minFinalityThreshold guidance
- Full worked example: gasless USDC bridge burn via CCTP V2
- Debugging checklist with all known silent failure modes
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