Skip to content

feat(consensus): Add OpTransaction trait#548

Merged
RomanHodulak merged 1 commit intomainfrom
op-tx-trait
Jun 16, 2025
Merged

feat(consensus): Add OpTransaction trait#548
RomanHodulak merged 1 commit intomainfrom
op-tx-trait

Conversation

@RomanHodulak
Copy link
Copy Markdown
Contributor

Closes #543

Motivation

To accept extended transactions composed of OpTransactions

Solution

Implement the trait for OpTxEnvelope and Extended

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Copy Markdown
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

great, next we also need fn as_desposit -> Option<&TxDeposit>?

@mattsse
Copy link
Copy Markdown
Member

mattsse commented Jun 16, 2025

this lacks a re-export from transaction/mod or lib.rs

* Implements the trait for `OpTxEnvelope` and `Extended`
* Useful for accepting extended transactions composed of `OpTransaction`s
@RomanHodulak RomanHodulak added this pull request to the merge queue Jun 16, 2025
Merged via the queue into main with commit 1843d37 Jun 16, 2025
21 checks passed
@RomanHodulak RomanHodulak deleted the op-tx-trait branch June 16, 2025 10:29
@github-project-automation github-project-automation bot moved this from In Review to Done in Project Tracking Jun 16, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jun 16, 2025
Follow-up on #548 

## Motivation

`OpTransaction` trait can tell if its deposit, but that is not very
useful if I also need to extract it.

## Solution

Add `as_deposit` function into the trait for the extraction of
`TxDeposit`.

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 21, 2026
Closes #543 

## Motivation

To accept extended transactions composed of `OpTransaction`s

## Solution

Implement the trait for `OpTxEnvelope` and `Extended`

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
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.

Move trait OpTransaction to op-alloy

2 participants