OpScope — Find Where a UserOperation Failed, and Prove It
Problem
When an ERC-4337 UserOperation fails, the bundler returns a two-word code like AA24 or AA31, or the operation is included and its call quietly reverts. The cause can sit in the smart account, the paymaster, the bundler's gas settings or the application contract, and reproducing it means hand-building forks, simulations and traces.
Business Impact
Account-abstraction wallets can fail in more places than a plain transaction: the account, the sponsor, the bundler and the app each have their own rules, and what reaches the user is a two-word code. OpScope turns one failed operation into a diagnosis a team can act on — stage, responsible component, decoded reason and evidence — plus a bundle a teammate or a wallet vendor can re-run, so support and engineering argue from facts instead of guesses.
System Approach
- Shared diagnosis package used by both the web app and the CLI: lifecycle stages, failure code, responsible component, observed facts, inferences, suggested checks, unknowns and limitations
- Bundler-style preflight: chain and block pin, EntryPoint code hash, nonce, deposits and prefund, owner-signature recovery, and EntryPointSimulations.simulateValidation through an eth_call state override
- One isolated, localhost-bound Anvil fork per job with a timeout and a concurrency limit; pending operations replay as the next block, included operations re-execute the original bundle from the exact pre-transaction state and original block environment
- Six executable fixtures on canonical EntryPoint v0.7 and SimpleAccount v0.7 bytecode (code hashes match Base Sepolia): paymaster deposit, wrong-chain signature, token balance spent by an earlier same-block transaction, reused nonce, account prefund, paymaster policy
- Web inspector (React, Vite, Tailwind, shadcn-style components, Monaco, TanStack Query, Motion): failure readout, the lifecycle drawn as an oscilloscope trace that dies at the failing stage, a keyboard-navigable call tree beside an evidence ledger
- Fastify API with SQLite + Drizzle sessions; CLI with inspect, replay, export and fixtures; bundles carry diagnosis.md, userop.json, the replay config, the trace and a sha256 manifest
Key Decisions & Trade-offs
- Preflight and replay are reported separately: a bundler-style simulation on the RPC and an EVM replay on a fork are different evidence, and agreement between them raises confidence
- Exactness is labelled on every run — exact (included operation, receipt matched), pinned (pending operation as a hypothetical next block) or approximate — and every state override and block-environment change is recorded
- Observed vs inferred: each explanation lists the observations it rests on, and a missing trace is an unknown, never a pass
- Local-first: the API answers on localhost only, refuses other Host headers and cross-site origins, keeps RPC URLs on the server and redacts them from every export; no private keys, nothing broadcast
- Narrow MVP: EntryPoint v0.7 and SimpleAccount v0.7 only; v0.6 and v0.8 are recognised and reported as unsupported rather than guessed
Current Status
Public at github.com/rohitguta2432/opscope since October 24, 2026. All six fixtures reproduce their expected results (AA31, AA24, execution revert, AA25, AA21, AA33) end to end through the API, the CLI and the web app. The included-operation fixture replays exactly — gasUsed and all logs identical to the original receipt — and exported bundles re-run to the same result with the pinned block hash verified.
Roadmap
- EntryPoint v0.8 and EIP-7702 accounts
- Signature analysis for Kernel, Safe and Coinbase Smart Wallet accounts
- ERC-7562 validation-rule tracing to explain mempool rejections
What I'd Improve Next
- Self-contained bundles for live sessions from a prestate trace of the touched accounts
- User-supplied ABIs for decoding application reverts
Explore More
- MyFinancial — Personal Financial Advisor — Financial planning in India is fragmented across banks, insurance, and tax documents.
- PropCheck — AI Property Trust Score for India — Indian property buyers lose lakhs to fraudulent listings on Magicbricks, 99acres, Housing.
- StellarMIND — Chat-to-SQL with RAG — Business users need to query databases without knowing SQL.
- ClinicAI — WhatsApp AI Clinic Assistant — India has 12 lakh+ small clinics running on phone calls and paper diaries.
- MicroItinerary — AI Travel Planner — Travel apps optimize for proximity and ratings.
- SanatanApp — Hindu Devotional App — Devotional users in India juggle 5+ separate apps for Chalisa, Gita, Aarti, Ramayan, and Mahabharat.
- SynFlow — Enterprise Intelligence Platform — Private deal networks rely on manual introductions and spreadsheets.
- FinBaby (Jama) — Personal Finance Tracker — Indian middle-class families track expenses across UPI apps, bank statements, and paper notebooks.
- RetailOS — Multi-Tenant Retail SaaS — Indian kirana stores and small retailers use paper registers or basic billing software with no inventory tracking, no GST compliance, and no offline support.
- TripHive — Offline-First Collaborative Trip Planner — Group trip planning is fragmented across WhatsApp, Google Docs, Maps, Splitwise, and email.
- ScamRakshak — On-Device AI Scam Detector — Indians lose thousands of crores annually to digital scams via WhatsApp, SMS, and social media.
- PaisaGuard — Family Budget Survival App — Middle-class families worldwide track expenses inconsistently — UPI apps show transactions but don't enforce budgets.
- rohitraj.tech — Engineering work is often invisible.
- Agent Autopsy — Forensic Debugger for Failed AI Agent Runs — Most AI agent failures are silent — the run completes, the status code is green, and the result is still wrong.
- tinyvoice — Fine-Tune a Model in Your Own Voice in an Afternoon — Training your own language model sounds like a PhD job that needs a GPU cluster, so most developers never try.
- snap3d — One Photo In, an Editable 3D Model Out — A photo shows you one side of an object; the other five sides are a guess.
- Agentic OS — Force-Directed Map of a 387-Skill Claude Code Setup — An agent setup grows one plugin at a time until it has hundreds of skills, and nobody can see what it actually contains.
- claude-autodev — Autonomous 8-Stage Dev Pipeline for Claude Code — Agentic coding tools stop at a diff.
- KisanSathi — Six AI Farm Experts, Keyless and Local — Farmer-facing AI tools die at the API-key step, answer in English, and hand back generic advice with no live numbers behind it.
- MarginChef — AI Agent That Finds a Restaurant's Margin Leaks — Restaurants run on 3-5% net margins while food costs are up roughly 35% since 2019, and most owners never see per-dish economics.
- Quorum — Deep-Research Agent Swarm with a Shared GraphRAG Brain — Most AI research tools are one model in a loop.
- RegexForge — Plain English to a Regex You Can Trust — Regex is not hard because the syntax is exotic.
- Skillet — Turn Any Docs Page Into an Installable Claude Code Skill — Agent skills are the fastest way to teach a coding agent a new tool, but writing a good SKILL.
- Ladle — Open-Source Prep Forecasting and Food-Cost Leak Detection — Restaurants throw away 4-10% of the food they buy before it reaches a plate, and most owners find out at month end from a food-cost percentage that moved the wrong way, with no idea which ingredient did it.
- Casita — Design Your Home in 3D in the Browser — Home design tools want an install, a login, or a CAD background.
- VoxelForge — A Voxel Sandbox Engine Built Properly — Voxel sandboxes are the demo everyone builds with a coding agent right now, and almost all of them are a throwaway single HTML file that hitches on chunk generation, ships a texture pack, and cannot be read or extended.
- prompt-ocean — Type a Sea, Watch It Exist — Generative interfaces usually hand a model the wheel and hope.
- HEXAPOD — Inverse Kinematics and Gait Simulator — Hexapod gait and leg IK are usually explained with equations and a video, or hidden inside a robotics library.
- avatar-sync — Real-Time Face and Hand Tracking in One HTML File — Face and hand tracking demos come wrapped in a build step, a server, and usually an API key — which puts a wall in front of anyone who just wants to see what the models actually output before building on them.
- TableTalk — Scan, Order, Eat: QR Ordering for Dine-In — Dine-in ordering still means flagging a waiter, squinting at a laminated menu with no photos, and repeating your order across the noise.
- Shoebox — Bill Photo to GST Ledger, Offline — Small shops in India keep supplier bills in a pile until the accountant asks.
- BridgeTrace — Find Where a USDC Transfer Stopped — A USDC transfer between chains can stop at three points: the source burn, Circle's attestation, or the destination receive transaction.
- x402-lab — Test AI-Agent Payments Before They Cost Real Money — AI agents can now pay for APIs over x402 (HTTP 402) in USDC, but there is no safe place to test it.
- Reliability & Production Readiness — Load testing, observability, and API contracts.
- Open Source Repos — Browse the source code behind these projects.