From 3e676958e8a204d1e5b13389d0f9b3589af2803c Mon Sep 17 00:00:00 2001 From: Jack Pooley <169029079+jackpooleywc@users.noreply.github.com> Date: Mon, 16 Sep 2024 09:56:17 +0200 Subject: [PATCH] feat(op receipt): re-add wait_for_user_operation_receipt to end to end tests --- crates/yttrium/src/account_client.rs | 6 ++++++ .../src/transaction/send/simple_account_test.rs | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/crates/yttrium/src/account_client.rs b/crates/yttrium/src/account_client.rs index 0b865ee..3f6eff8 100644 --- a/crates/yttrium/src/account_client.rs +++ b/crates/yttrium/src/account_client.rs @@ -296,6 +296,12 @@ mod tests { println!("user_operation_hash: {:?}", user_operation_hash); + let receipt = account_client + .wait_for_user_operation_receipt(user_operation_hash) + .await?; + + println!("receipt: {:?}", receipt); + Ok(()) } diff --git a/crates/yttrium/src/transaction/send/simple_account_test.rs b/crates/yttrium/src/transaction/send/simple_account_test.rs index f76495a..30bb7c6 100644 --- a/crates/yttrium/src/transaction/send/simple_account_test.rs +++ b/crates/yttrium/src/transaction/send/simple_account_test.rs @@ -457,6 +457,18 @@ mod tests { ) .await?; + println!("Querying for receipts..."); + + let receipt = bundler_client + .wait_for_user_operation_receipt(user_operation_hash.clone()) + .await?; + + let tx_hash = receipt.receipt.transaction_hash; + println!( + "UserOperation included: https://sepolia.etherscan.io/tx/{}", + tx_hash + ); + Ok(user_operation_hash) }