Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rpc): make TransactionCompat::fill stateful #11732

Merged
merged 12 commits into from
Oct 24, 2024
Merged

Conversation

emhane
Copy link
Member

@emhane emhane commented Oct 15, 2024

Ref #11708
Closes #11164

Makes TransactionCompat::fill take ref to self, to be able to add necessary data to OpTxBuilder to resolve the deposit receipt version for a transaction response

@emhane emhane added A-rpc Related to the RPC implementation A-op-reth Related to Optimism and op-reth labels Oct 15, 2024
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

needs to instead implement TransactionCompat on the OpEthApi, so that we can fetch the receipt in the fill impl

@emhane emhane requested a review from Rjected October 22, 2024 11:53
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

just one comment, otherwise this looks good to me

Comment on lines +111 to +117
let deposit_receipt_version = self
.inner
.provider()
.receipt_by_hash(hash)
.ok() // todo: change sig to return result
.flatten()
.and_then(|receipt| receipt.deposit_receipt_version);
Copy link
Member

Choose a reason for hiding this comment

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

let's do the todo here, maybe the error can be an associated type?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's quite a big change, effects signature of more rpc compat signatures, suggest it's done in a separate pr

Copy link
Member

Choose a reason for hiding this comment

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

alright, let's make an issue to track

Copy link
Member Author

Choose a reason for hiding this comment

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

@emhane emhane requested a review from Rjected October 22, 2024 20:07
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

lgtm

@emhane emhane added this pull request to the merge queue Oct 24, 2024
Merged via the queue into main with commit 7a06298 Oct 24, 2024
39 checks passed
@emhane emhane deleted the emhane/stateful-tx-compat branch October 24, 2024 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth A-rpc Related to the RPC implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deposit receipt version in OP RPC transaction
2 participants