Skip to content

feat: add try_into_block_with methods to OpExecutionPayload#563

Merged
mattsse merged 2 commits intomainfrom
feat/add-try-into-block-with-methods
Jul 2, 2025
Merged

feat: add try_into_block_with methods to OpExecutionPayload#563
mattsse merged 2 commits intomainfrom
feat/add-try-into-block-with-methods

Conversation

@mattsse
Copy link
Copy Markdown
Member

@mattsse mattsse commented Jun 27, 2025

Adds custom transaction mapping functionality to OpExecutionPayload types, following the same pattern as alloy-rs/alloy#2495.

Changes

  • Add try_into_block_with method to OpExecutionPayloadV4 that accepts a custom transaction mapper
  • Add try_into_block_with method to OpExecutionPayload enum for all payload versions
  • Add try_into_block_with_sidecar_with method to OpExecutionPayload for sidecar conversions with custom mapping
  • Update existing try_into_block methods to use the new _with variants internally

This enables more flexible transaction decoding when converting execution payloads to blocks, allowing callers to provide their own transaction decoding logic while maintaining the same validation checks.

mattsse and others added 2 commits June 28, 2025 00:44
The Decodable2718Ext trait doesn't exist in alloy-eips v1.0.15.
The decode_2718_exact method is directly available on the Decodable2718
trait itself, so the additional import is not needed.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@yash-atreya yash-atreya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@github-project-automation github-project-automation bot moved this to In Review in Project Tracking Jul 2, 2025
@mattsse mattsse added this pull request to the merge queue Jul 2, 2025
Merged via the queue into main with commit 5fca6ed Jul 2, 2025
21 checks passed
@mattsse mattsse deleted the feat/add-try-into-block-with-methods branch July 2, 2025 12:34
@github-project-automation github-project-automation bot moved this from In Review to Done in Project Tracking Jul 2, 2025
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 21, 2026
…/op-alloy#563)

Adds custom transaction mapping functionality to OpExecutionPayload
types, following the same pattern as
alloy-rs/alloy#2495.

## Changes

- Add `try_into_block_with` method to `OpExecutionPayloadV4` that
accepts a custom transaction mapper
- Add `try_into_block_with` method to `OpExecutionPayload` enum for all
payload versions
- Add `try_into_block_with_sidecar_with` method to `OpExecutionPayload`
for sidecar conversions with custom mapping
- Update existing `try_into_block` methods to use the new `_with`
variants internally

This enables more flexible transaction decoding when converting
execution payloads to blocks, allowing callers to provide their own
transaction decoding logic while maintaining the same validation checks.

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants