diff --git a/Cargo.toml b/Cargo.toml index a8e3414..ead353b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ reqwest = ["dep:reqwest"] [dependencies] alloy = { git = "https://github.com/alloy-rs/alloy", features = [ "rpc", + "rpc-client", "json-rpc", "rpc-types", "rpc-types-eth", diff --git a/README.md b/README.md index f250652..8e336bc 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ use alloy_flashbots::{ use alloy_primitives::{address, U256}; use alloy::network::{Ethereum, EthereumSigner}; use alloy::providers::ProviderBuilder; -use alloy::rpc::client::RpcClient; use alloy::rpc::types::eth::TransactionRequest; use alloy::signers::LocalWallet; use anyhow::Result; diff --git a/src/provider_builder_ext.rs b/src/provider_builder_ext.rs index a990db2..7c6ed89 100644 --- a/src/provider_builder_ext.rs +++ b/src/provider_builder_ext.rs @@ -1,7 +1,7 @@ use alloy::{ network::Network, providers::{fillers::TxFiller, ProviderBuilder, ProviderLayer, RootProvider}, - rpc::client::RpcClient, + rpc::client::ClientBuilder, signers::Signer, transports::Transport, }; @@ -41,7 +41,7 @@ impl FlashbotsProviderBuilderExt for ProviderBuilder S: Signer + Clone + Send + Sync, N: Network, { - let client = RpcClient::builder() + let client = ClientBuilder::default() .layer(FlashbotsLayer::new(signer)) .http(url); diff --git a/src/provider_ext.rs b/src/provider_ext.rs index 9a6186a..81d807e 100644 --- a/src/provider_ext.rs +++ b/src/provider_ext.rs @@ -1,13 +1,14 @@ -use alloy::network::eip2718::Encodable2718; -use alloy::network::Network; -use alloy::providers::fillers::{FillProvider, TxFiller}; -use alloy::providers::Provider; -use alloy::transports::{Transport, TransportErrorKind, TransportResult}; +use alloy::{ + network::eip2718::Encodable2718, + network::Network, + providers::fillers::{FillProvider, TxFiller}, + providers::Provider, + transports::{Transport, TransportErrorKind, TransportResult}, +}; use async_trait::async_trait; use crate::rpc::BundleItem; use crate::rpc::{SendBundleRequest, SendBundleResponse, SimBundleOverrides, SimBundleResponse}; - /// Extension trait for sending and simulate bundles. #[async_trait] pub trait FlashbotsProviderExt