Add OP Stack integration for L2 chain tracking
User description
Summary
- Implements full OP Stack support to track batches, state roots, deposits, and withdrawals between custom L2 OP Stack chains and L1
- Creates 5 new database models: OpChainConfig, OpBatch, OpOutput, OpDeposit, OpWithdrawal
- Adds event detection libraries for all OP Stack contract events (deposits, outputs, withdrawals, batches)
- Supports both legacy (L2OutputOracle) and modern (DisputeGameFactory/Fault Proofs) chains
- Includes background jobs for output finalization tracking and deposit-to-L2 transaction linking
- Provides API endpoints for querying all OP Stack entities
- Adds 8 Vue frontend components: deposits, withdrawals, batches, outputs pages with detail views
- Implements transaction lifecycle component showing L2 tx progression to L1 finalization
- Renames
isTopOrbitParenttoisTopL1Parentto share parent workspace linking between Orbit and OP Stack
Test plan
- [x] Backend tests pass (95 suites, 1150 tests)
- [x] Frontend tests pass (719 tests)
- [ ] Run migrations on staging database
- [ ] Test OP config creation via explorer settings
- [ ] Verify batch detection on L1 indexer
- [ ] Verify deposit/withdrawal event processing
- [ ] Test frontend pages load correctly
🤖 Generated with Claude Code
CodeAnt-AI Description
Add OP Stack integration for tracking L2 batches, deposits, outputs, and withdrawals
What Changed
- Explorer workspaces can now create, update and fetch an OP Stack configuration to connect an L2 (OP Stack) chain to its parent L1.
- New user-facing APIs and client methods let users list and view OP batches, outputs, deposits, withdrawals, and withdrawal proof data.
- The L1 block sync detects batch submissions to a chain's BatchInbox and creates OP batch records; batch detail endpoints expose estimated L2 block ranges and blob info when available.
- L1 OptimismPortal Deposit events produce OP deposit records (including a derived L2 transaction hash) and a background job links deposits to L2 transactions so deposits show as confirmed once the L2 tx is found.
- L2 events create OP withdrawal records and L1 events update withdrawal status to proven or finalized; outputs (legacy and dispute-game) are recorded and include challenge period metadata.
- New database models, migrations, UI pages/components for OP batches/outputs/deposits/withdrawals, and comprehensive tests covering parsing, APIs and background jobs.
Impact
✅ Can view OP batches and their estimated L2 coverage
✅ Clearer withdrawal proof and finalization status
✅ Fewer manual steps to link L1 deposits to L2 transactions
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
@codeant-ai ask: Your question here
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
@codeant-ai ask: Can you suggest a safer alternative to storing this secret?
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
@codeant-ai: Your feedback here
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
@codeant-ai: Do not flag unused imports.
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
@codeant-ai: review
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.