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

feat(rpc): add rundler_getMinedUserOperation #1045

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dancoombs
Copy link
Collaborator

Closes #1044

Proposed Changes

  • Adds rundler_getMinedUserOperation
  • Refactors some of the event code for reuse with the new RPC call

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

Attention: Patch coverage is 4.16667% with 115 lines in your changes missing coverage. Please review.

Project coverage is 60.25%. Comparing base (5147aed) to head (cc2d109).

Files with missing lines Patch % Lines
crates/rpc/src/rundler.rs 0.00% 41 Missing ⚠️
crates/rpc/src/eth/events/common.rs 11.90% 37 Missing ⚠️
crates/rpc/src/eth/router.rs 0.00% 32 Missing ⚠️
crates/rpc/src/eth/events/v0_6.rs 0.00% 2 Missing ⚠️
crates/rpc/src/eth/events/v0_7.rs 0.00% 2 Missing ⚠️
crates/rpc/src/task.rs 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
crates/rpc/src/eth/events/mod.rs 100.00% <ø> (ø)
crates/rpc/src/types/mod.rs 12.28% <ø> (ø)
crates/rpc/src/task.rs 0.00% <0.00%> (ø)
crates/rpc/src/eth/events/v0_6.rs 23.91% <0.00%> (+0.50%) ⬆️
crates/rpc/src/eth/events/v0_7.rs 0.00% <0.00%> (ø)
crates/rpc/src/eth/router.rs 26.24% <0.00%> (-4.45%) ⬇️
crates/rpc/src/eth/events/common.rs 30.33% <11.90%> (-24.51%) ⬇️
crates/rpc/src/rundler.rs 0.00% <0.00%> (ø)
Flag Coverage Δ
unit-tests 60.25% <4.16%> (-0.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
rundler binary 0.00% <ø> (ø)
builder 69.35% <ø> (ø)
dev ∅ <ø> (∅)
pool 68.43% <ø> (ø)
provider 15.62% <ø> (ø)
rpc 24.50% <4.16%> (-2.14%) ⬇️
sim 81.31% <ø> (ø)
tasks ∅ <ø> (∅)
types 67.39% <ø> (ø)
utils 31.89% <ø> (ø)
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dancoombs dancoombs force-pushed the danc/rundler-receipt branch 6 times, most recently from 73d64b9 to 147982e Compare March 7, 2025 20:52
@dancoombs dancoombs force-pushed the danc/rundler-receipt branch from 147982e to cc2d109 Compare March 11, 2025 14:49
(Some(uo), Some(mut receipt)) => {
// clear out the outer transaction logs from the receipt to avoid sending
// extra data in the response. OOF - this type is a mess.
receipt.receipt.inner.inner.receipt.logs.clear();
Copy link
Collaborator

Choose a reason for hiding this comment

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

that is wild haha

@@ -91,24 +104,40 @@ where
)
.await
}

async fn get_mined_user_operation(
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want to add tracing to this request?

tx_receipt: &'a TransactionReceipt,
) -> Option<&'a Log> {
tx_receipt.inner.logs().iter().find(|l| {
l.topics()[0] == E::UserOperationEvent::SIGNATURE_HASH && l.topics()[1] == uo_hash
Copy link
Collaborator

Choose a reason for hiding this comment

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

if passed an incorrect tx receipt will this return an index out of bounds?

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.

[rpc] add rundler_getMinedUserOperation
2 participants