ethereum-optimism / ethereum-optimism/optimism
Bug Report: Incompatibility and Missing Documentation for OptimismPortal2.sol in Interop Rollup Updates
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 38m
- Merged PRs (30d)
- 164
Description
📌 Summary
After the recent Optimism Bedrock/Interop updates, including the deployment of OptimismPortal2.sol, there is insufficient documentation and tooling support for developers implementing custom bridges or sequencers. The current version of [Viem](https://viem.sh/) does not support the updated ABI or event structure of OptimismPortal2, causing compatibility issues and runtime errors. This makes it impossible to implement a fully functional native bridge on custom OP Stack chains relying on updated rollup contracts.
🔧 Environment
Client library: viem@latest
Optimism repo: ethereum-optimism/monorepo (or relevant fork)
OS: macOS/Linux/Ubuntu (Dev Machine + Containerized L2 Infra)
Chain: Custom OP Stack L2 with Interop rollup config
Portal Contract Version: OptimismPortal2.sol (post-interop update)
⚠️ Expected Behavior
ABI compatibility with viem
Ability to decode logs/events like WithdrawalProven, WithdrawalFinalized, WithdrawalHalted, etc.
Clear migration and usage guidelines for OptimismPortal2.sol
Consistent behavior with prior OptimismPortal (v1)
💥 Actual Behavior
ABI parsing fails for events with custom struct arguments and new storage access patterns
Event decoding throws:
vbnet
Copy
Edit
Error: Decoding error: unable to decode log for event "WithdrawalProven"
Incompatibility with:
Updated withdrawal finalization logic
Custom calldata formats
New state access pattern (anchorStateRegistry, disputeGameFactory references)
No clear documentation on:
OptimismPortal2.sol deployment procedure
Canonical ABI or address assignment
Required challenger/attester interactions
Portal upgrade path
🔍 Steps to Reproduce
Set up a custom OP Stack chain using the interop rollup configuration
Deploy the latest OptimismPortal2.sol
Attempt to:
Listen for events using Viem
Parse withdrawal logs from L2 → L1 messages
Observe parsing errors and decoding failures
Check optimism monorepo/docs for guidelines (none found)
🧩 Related Components
[OptimismPortal2.sol](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/contracts/L1/OptimismPortal2.sol)
OP Challenger (dispute game dependencies)
L2 withdraw-prove-finalize lifecycle
AnchorStateRegistry & GameProxy support
Contributor guide
Assessment
This issue has not been assessed yet.