Skip to content

feat(consensus): Add as_deposit into OpTransaction trait#549

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

feat(consensus): Add as_deposit into OpTransaction trait#549
RomanHodulak merged 1 commit intomainfrom
op-tx-deposit

Conversation

@RomanHodulak
Copy link
Copy Markdown
Contributor

@RomanHodulak RomanHodulak commented 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

@RomanHodulak RomanHodulak added this pull request to the merge queue Jun 16, 2025
Merged via the queue into main with commit ca2e5b9 Jun 16, 2025
21 checks passed
@RomanHodulak RomanHodulak deleted the op-tx-deposit branch June 16, 2025 11:51
@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
…550)

Follow-up on #549 

## Motivation

The RPC transaction object has a dedicated conversion function that
accepts `OpTxEnvelope` struct. But it cannot be used with a transaction
that is not `OpTxEnvelope` but implements `OpTransaction`.

## Solution

Since `OpTransaction` provides all the needed functionality for the
conversion, replace the `OpTxEnvelope` type with a generic type.

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 21, 2026
…s/op-alloy#549)

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
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