Skip to content

Conversation

@Himess
Copy link
Contributor

@Himess Himess commented Jan 10, 2026

Summary

Introduces UnifiedReceiptBuilder - a wrapper that handles both deposit and non-deposit transaction receipts seamlessly, eliminating the try-catch pattern required by OpReceiptBuilder.

Changes

  • Added receipt_builder.rs with UnifiedReceiptBuilder<C> struct
  • Single build() method handles both tx types internally
  • Simplified state_builder.rs - removed ~40 lines of manual deposit handling
  • Removed unused alloy-op-evm dependency

Closes #309

…eipt handling

Add a new UnifiedReceiptBuilder that handles both deposit and non-deposit
transactions seamlessly without requiring error handling at the call site.

The builder wraps OpRethReceiptBuilder and automatically handles the deposit
receipt case internally, eliminating the need for callers to implement the
try-catch pattern typically required when using build_receipt followed by
build_deposit_receipt.

Changes:
- Add receipt_builder module with UnifiedReceiptBuilder
- Update PendingStateBuilder to use UnifiedReceiptBuilder
- Simplify execute_with_evm method by removing manual deposit handling
- Remove receipt_builder parameter from PendingStateBuilder::new()

Closes base#309
@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Jan 10, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@Himess Himess marked this pull request as draft January 10, 2026 21:58
Removed wrapper around OpRethReceiptBuilder and implemented direct
receipt building logic. This fixes type mismatches between OpTxEnvelope
and OpTransactionSigned that prevented compilation.

- Use direct OpTxType matching instead of build_receipt/build_deposit_receipt pattern
- Accept ExecutionResult<E::HaltReason> for proper generic type handling
- Remove unused alloy-op-evm dependency
@Himess Himess marked this pull request as ready for review January 10, 2026 22:53
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.

Create a new ReceiptBuilder builds deposit receipts

2 participants