From 175762e2ed0a96d910d124bc40cb0e21799aa7c0 Mon Sep 17 00:00:00 2001 From: jole Date: Wed, 20 Apr 2022 17:33:48 +0200 Subject: [PATCH] Add support for subscribing to newPendingTransactionsComplete --- ethers-providers/src/lib.rs | 9 +++++++++ ethers-providers/src/provider.rs | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/ethers-providers/src/lib.rs b/ethers-providers/src/lib.rs index ca7f46ebb..05efefd0c 100644 --- a/ethers-providers/src/lib.rs +++ b/ethers-providers/src/lib.rs @@ -617,6 +617,15 @@ pub trait Middleware: Sync + Send + Debug { self.inner().subscribe_pending_txs().await.map_err(FromErr::from) } + async fn subscribe_pending_txs_complete( + &self, + ) -> Result, Self::Error> + where + ::Provider: PubsubClient, + { + self.inner().subscribe_pending_txs_complete().await.map_err(FromErr::from) + } + async fn subscribe_logs<'a>( &'a self, filter: &Filter, diff --git a/ethers-providers/src/provider.rs b/ethers-providers/src/provider.rs index 8c16dc436..7eece910e 100644 --- a/ethers-providers/src/provider.rs +++ b/ethers-providers/src/provider.rs @@ -1097,6 +1097,15 @@ impl Middleware for Provider

{ self.subscribe(["newPendingTransactions"]).await } + async fn subscribe_pending_txs_complete( + &self, + ) -> Result, ProviderError> + where + P: PubsubClient, + { + self.subscribe(["newPendingTransactionsComplete"]).await + } + async fn subscribe_logs<'a>( &'a self, filter: &Filter,