pub struct BroadcasterMiddleware<M, S> { /* private fields */ }
Expand description

A middleware used to broadcast bundles to multiple builders.

NOTE: This middleware does NOT sign your transactions. Use another method to sign your transactions, and then forward the signed transactions to the middleware.

You can either send custom bundles (see BundleRequest) or send transactions as you normally would (see [Middleware::send_transaction]) from another middleware.

If you use [Middleware::send_transaction] then a bundle will be constructed for you with the following assumptions:

  • You do not want to allow the transaction to revert
  • You do not care to set a minimum or maximum timestamp for the bundle
  • The block you are targetting with your bundle is the next block
  • You do not want to simulate the bundle before sending to the builder

Example

use ethers::prelude::*;
use std::convert::TryFrom;
use ethers_flashbots::BroadcasterMiddleware;
use url::Url;

let provider = Provider::<Http>::try_from("http://localhost:8545")
    .expect("Could not instantiate HTTP provider");

// Used to sign Flashbots relay requests - this is your searcher identity
let signer: LocalWallet = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"
    .parse()?;

// Used to sign transactions
let wallet: LocalWallet = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"
    .parse()?;

// Note: The order is important! You want the signer
// middleware to sign your transactions *before* they
// are sent to your Flashbots middleware.
let mut client = SignerMiddleware::new(
    BroadcasterMiddleware::new(
        provider,
        vec![Url::parse("https://rpc.titanbuilder.xyz")?, Url::parse("https://relay.flashbots.net")?],
        Url::parse("https://relay.flashbots.net")?,
        signer
    ),
    wallet
);

// This transaction will now be sent as a Flashbots bundle!
let tx = TransactionRequest::pay("vitalik.eth", 100);
let pending_tx = client.send_transaction(tx, None).await?;

Implementations§

source§

impl<M: Middleware, S: Signer> BroadcasterMiddleware<M, S>

source

pub fn new( inner: M, relay_urls: Vec<Url>, simulation_relay: impl Into<Url>, relay_signer: S ) -> Selfwhere S: Clone,

Initialize a new Flashbots middleware.

The signer is used to sign requests to the relay.

source

pub fn relay(&self) -> &Vec<Relay<S>>

Get the relay client used by the middleware.

source

pub fn simulation_relay(&self) -> &Relay<S>

Get the relay client used by the middleware to simulate bundles.

source

pub async fn simulate_bundle( &self, bundle: &BundleRequest ) -> Result<SimulatedBundle, FlashbotsMiddlewareError<M, S>>

Simulate a bundle.

See eth_callBundle for more information.

source

pub async fn send_bundle( &self, bundle: &BundleRequest ) -> Result<Vec<Result<PendingBundle<'_, <Self as Middleware>::Provider>, FlashbotsMiddlewareError<M, S>>>, FlashbotsMiddlewareError<M, S>>

Broadcast a bundle to the builders.

See eth_sendBundle for more information.

Trait Implementations§

source§

impl<M: Debug, S: Debug> Debug for BroadcasterMiddleware<M, S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<M, S> Middleware for BroadcasterMiddleware<M, S>where M: Middleware, S: Signer,

§

type Error = FlashbotsMiddlewareError<M, S>

Error type returned by most operations
§

type Provider = <M as Middleware>::Provider

The JSON-RPC client type at the bottom of the stack
§

type Inner = M

The next-lower middleware in the middleware stack
source§

fn inner(&self) -> &M

Get a reference to the next-lower middleware in the middleware stack
source§

fn send_raw_transaction<'a, 'async_trait>( &'a self, tx: Bytes ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, Self::Provider>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'a: 'async_trait,

Send the raw RLP encoded transaction to the entire Ethereum network and returns the transaction’s hash This will consume gas from the account that signed the transaction.
§

fn convert_err(p: ProviderError) -> Self::Error

Convert a provider error into the associated error type by successively converting it to every intermediate middleware error
§

fn provider(&self) -> &Provider<Self::Provider>

The HTTP or Websocket provider.
§

fn default_sender(&self) -> Option<H160>

Return the default sender (if any). This will typically be the connected node’s first address, or the address of a Signer in a lower middleware stack
§

fn client_version<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the current client version using the web3_clientVersion RPC.
§

fn fill_transaction<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 mut TypedTransaction, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Fill necessary details of a transaction for dispatch Read more
§

fn get_block_number<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<U64, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Get the block number
§

fn send_transaction<'life0, 'async_trait, T>( &'life0 self, tx: T, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'life0, Self::Provider>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<TypedTransaction> + Send + Sync, Self: 'async_trait,

Sends the transaction to the entire Ethereum network and returns the transaction’s hash. This will consume gas from the account that signed the transaction. This call will fail if no signer is available, and the RPC node does not have an unlocked accounts
§

fn send_escalating<'a, 'life0, 'async_trait>( &'a self, tx: &'life0 TypedTransaction, escalations: usize, policy: Box<dyn Fn(U256, usize) -> U256 + Sync + Send, Global> ) -> Pin<Box<dyn Future<Output = Result<EscalatingPending<'a, Self::Provider>, Self::Error>> + Send + 'async_trait, Global>>where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait,

Send a transaction with a simple escalation policy. Read more
§

fn resolve_name<'life0, 'life1, 'async_trait>( &'life0 self, ens_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<H160, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns the address that the ens_name resolves to (or None if not configured). Read more
§

fn lookup_address<'life0, 'async_trait>( &'life0 self, address: H160 ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the ENS name the address resolves to (or None if not configured). Read more
§

fn resolve_avatar<'life0, 'life1, 'async_trait>( &'life0 self, ens_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Url, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns the avatar HTTP link of the avatar that the ens_name resolves to (or None if not configured) Read more
§

fn resolve_nft<'life0, 'async_trait>( &'life0 self, token: ERCNFT ) -> Pin<Box<dyn Future<Output = Result<Url, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the URL (not necesserily HTTP) of the image behind a token. Read more
§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ens_name: &'life1 str, field: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Fetch a field for the ens_name (no None if not configured). Read more
§

fn get_block<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T ) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Self: 'async_trait,

Gets the block at block_hash_or_number (transaction hashes only)
§

fn get_block_with_txs<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T ) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Self: 'async_trait,

Gets the block at block_hash_or_number (full transactions included)
§

fn get_uncle_count<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Self: 'async_trait,

Gets the block uncle count at block_hash_or_number
§

fn get_uncle<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, idx: U64 ) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Self: 'async_trait,

Gets the block uncle at block_hash_or_number and idx
§

fn get_transaction_count<'life0, 'async_trait, T>( &'life0 self, from: T, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Self: 'async_trait,

Returns the nonce of the address
§

fn estimate_gas<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 TypedTransaction, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Sends a transaction to a single Ethereum node and return the estimated amount of gas required (as a U256) to send it This is free, but only an estimate. Providing too little gas will result in a transaction being rejected (while still consuming all provided gas).
§

fn call<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 TypedTransaction, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Sends the read-only (constant) transaction to a single Ethereum node and return the result (as bytes) of executing it. This is free, since it does not change any state on the blockchain.
§

fn syncing<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<SyncingStatus, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Return current client syncing status. If IsFalse sync is over.
§

fn get_chainid<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by EIP-155.
§

fn get_net_version<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the network version.
§

fn get_balance<'life0, 'async_trait, T>( &'life0 self, from: T, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Self: 'async_trait,

Returns the account’s balance
§

fn get_transaction<'life0, 'async_trait, T>( &'life0 self, transaction_hash: T ) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Send + Sync + Into<H256>, Self: 'async_trait,

Gets the transaction with transaction_hash
§

fn get_transaction_by_block_and_index<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, idx: U64 ) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Self: 'async_trait,

Gets the transaction with block and index
§

fn get_transaction_receipt<'life0, 'async_trait, T>( &'life0 self, transaction_hash: T ) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Send + Sync + Into<H256>, Self: 'async_trait,

Gets the transaction receipt with transaction_hash
§

fn get_block_receipts<'life0, 'async_trait, T>( &'life0 self, block: T ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockNumber> + Send + Sync, Self: 'async_trait,

Returns all receipts for a block. Read more
§

fn get_gas_price<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Gets the current gas price as estimated by the node
§

fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<fn(_: U256, _: Vec<Vec<U256, Global>, Global>) -> (U256, U256)> ) -> Pin<Box<dyn Future<Output = Result<(U256, U256), Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Gets a heuristic recommendation of max fee per gas and max priority fee per gas for EIP-1559 compatible transactions.
§

fn get_accounts<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<H160, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Gets the accounts on the node
§

fn is_signer<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

This returns true if either the middleware stack contains a SignerMiddleware, or the JSON-RPC provider has an unlocked key that can sign using the eth_sign call. If none of the above conditions are met, then the middleware stack is not capable of signing data.
§

fn sign<'life0, 'life1, 'async_trait, T>( &'life0 self, data: T, from: &'life1 H160 ) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, T: 'async_trait + Into<Bytes> + Send + Sync, Self: 'async_trait,

Signs data using a specific account. This account needs to be unlocked, or the middleware stack must contain a SignerMiddleware
§

fn sign_transaction<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 TypedTransaction, from: H160 ) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Sign a transaction via RPC call
§

fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter ) -> Pin<Box<dyn Future<Output = Result<Vec<Log, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns an array (possibly empty) of logs that match the filter
§

fn get_logs_paginated<'a>( &'a self, filter: &Filter, page_size: u64 ) -> LogQuery<'a, Self::Provider>

Returns a stream of logs are loaded in pages of given page size
§

fn watch<'a, 'life0, 'async_trait>( &'a self, filter: &'life0 Filter ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, Self::Provider, Log>, Self::Error>> + Send + 'async_trait, Global>>where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait,

Streams event logs matching the filter. Read more
§

fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, Self::Provider, H256>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Streams pending transactions. Read more
§

fn watch_blocks<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, Self::Provider, H256>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Streams new block hashes Read more
§

fn get_code<'life0, 'async_trait, T>( &'life0 self, at: T, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<Bytes, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Self: 'async_trait,

Returns the deployed code at a given address
§

fn get_storage_at<'life0, 'async_trait, T>( &'life0 self, from: T, location: H256, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<H256, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Self: 'async_trait,

Get the storage of an address for a particular slot location
§

fn get_proof<'life0, 'async_trait, T>( &'life0 self, from: T, locations: Vec<H256, Global>, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<EIP1186ProofResponse, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Self: 'async_trait,

Returns the EIP-1186 proof response https://github.com/ethereum/EIPs/issues/1186
§

fn mining<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns an indication if this node is currently mining.
§

fn import_raw_key<'life0, 'async_trait>( &'life0 self, private_key: Bytes, passphrase: String ) -> Pin<Box<dyn Future<Output = Result<H160, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Sends the given key to the node to be encrypted with the provided passphrase and stored. Read more
§

fn unlock_account<'life0, 'async_trait, T>( &'life0 self, account: T, passphrase: String, duration: Option<u64> ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<H160> + Send + Sync, Self: 'async_trait,

Prompts the node to decrypt the given account from its keystore. Read more
§

fn add_peer<'life0, 'async_trait>( &'life0 self, enode_url: String ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Requests adding the given peer, returning a boolean representing whether or not the peer was accepted for tracking.
§

fn add_trusted_peer<'life0, 'async_trait>( &'life0 self, enode_url: String ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Requests adding the given peer as a trusted peer, which the node will always connect to even when its peer slots are full.
§

fn node_info<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<NodeInfo, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns general information about the node as well as information about the running p2p protocols (e.g. eth, snap).
§

fn peers<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the list of peers currently connected to the node.
§

fn remove_peer<'life0, 'async_trait>( &'life0 self, enode_url: String ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Requests to remove the given peer, returning true if the enode was successfully parsed and the peer was removed.
§

fn remove_trusted_peer<'life0, 'async_trait>( &'life0 self, enode_url: String ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Requests to remove the given peer, returning a boolean representing whether or not the enode url passed was validated. A return value of true does not necessarily mean that the peer was disconnected.
§

fn start_mining<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Starts the miner.
§

fn stop_mining<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Stop terminates the miner, both at the consensus engine level as well as at the block creation level.
§

fn txpool_content<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here
§

fn txpool_inspect<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here
§

fn txpool_status<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns the number of transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here
§

fn debug_trace_transaction<'life0, 'async_trait>( &'life0 self, tx_hash: H256, trace_options: GethDebugTracingOptions ) -> Pin<Box<dyn Future<Output = Result<GethTrace, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

After replaying any previous transactions in the same block, Replays a transaction, returning the traces configured with passed options
§

fn debug_trace_call<'life0, 'async_trait, T>( &'life0 self, req: T, block: Option<BlockId>, trace_options: GethDebugTracingCallOptions ) -> Pin<Box<dyn Future<Output = Result<GethTrace, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<TypedTransaction> + Send + Sync, Self: 'async_trait,

Executes the given call and returns a number of possible traces for it
§

fn debug_trace_block_by_number<'life0, 'async_trait>( &'life0 self, block: Option<BlockNumber>, trace_options: GethDebugTracingOptions ) -> Pin<Box<dyn Future<Output = Result<Vec<GethTrace, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Replays all transactions in a given block (specified by block number) and returns the traces configured with passed options Ref: Here
§

fn debug_trace_block_by_hash<'life0, 'async_trait>( &'life0 self, block: H256, trace_options: GethDebugTracingOptions ) -> Pin<Box<dyn Future<Output = Result<Vec<GethTrace, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Replays all transactions in a given block (specified by block hash) and returns the traces configured with passed options Ref: Here
§

fn trace_call<'life0, 'async_trait, T>( &'life0 self, req: T, trace_type: Vec<TraceType, Global>, block: Option<BlockNumber> ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<TypedTransaction> + Send + Sync, Self: 'async_trait,

Executes the given call and returns a number of possible traces for it
§

fn trace_call_many<'life0, 'async_trait, T>( &'life0 self, req: Vec<(T, Vec<TraceType, Global>), Global>, block: Option<BlockNumber> ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<TypedTransaction> + Send + Sync, Self: 'async_trait,

Executes given calls and returns a number of possible traces for each call
§

fn trace_raw_transaction<'life0, 'async_trait>( &'life0 self, data: Bytes, trace_type: Vec<TraceType, Global> ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Traces a call to eth_sendRawTransaction without making the call, returning the traces
§

fn trace_replay_transaction<'life0, 'async_trait>( &'life0 self, hash: H256, trace_type: Vec<TraceType, Global> ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Replays a transaction, returning the traces
§

fn trace_replay_block_transactions<'life0, 'async_trait>( &'life0 self, block: BlockNumber, trace_type: Vec<TraceType, Global> ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Replays all transactions in a block returning the requested traces for each transaction
§

fn trace_block<'life0, 'async_trait>( &'life0 self, block: BlockNumber ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns traces created at given block
§

fn trace_filter<'life0, 'async_trait>( &'life0 self, filter: TraceFilter ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Return traces matching the given filter
§

fn trace_get<'life0, 'async_trait, T>( &'life0 self, hash: H256, index: Vec<T, Global> ) -> Pin<Box<dyn Future<Output = Result<Trace, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<U64> + Send + Sync, Self: 'async_trait,

Returns trace at the given position
§

fn trace_transaction<'life0, 'async_trait>( &'life0 self, hash: H256 ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

Returns all traces of a given transaction
§

fn parity_block_receipts<'life0, 'async_trait, T>( &'life0 self, block: T ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt, Global>, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockNumber> + Send + Sync, Self: 'async_trait,

Returns all receipts for that block. Must be done on a parity node.
§

fn fee_history<'life0, 'life1, 'async_trait, T>( &'life0 self, block_count: T, last_block: BlockNumber, reward_percentiles: &'life1 [f64] ) -> Pin<Box<dyn Future<Output = Result<FeeHistory, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, T: 'async_trait + Into<U256> + Serialize + Send + Sync, Self: 'async_trait,

Query the node for a [FeeHistory] object. This objct contains information about the EIP-1559 base fee in past blocks, as well as gas utilization within those blocks. Read more
§

fn create_access_list<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 TypedTransaction, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<AccessListWithGasUsed, Self::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Querty the node for an EIP-2930 Access List. Read more

Auto Trait Implementations§

§

impl<M, S> !RefUnwindSafe for BroadcasterMiddleware<M, S>

§

impl<M, S> Send for BroadcasterMiddleware<M, S>where M: Send, S: Send,

§

impl<M, S> Sync for BroadcasterMiddleware<M, S>where M: Sync, S: Sync,

§

impl<M, S> Unpin for BroadcasterMiddleware<M, S>where M: Unpin, S: Unpin,

§

impl<M, S> !UnwindSafe for BroadcasterMiddleware<M, S>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<M> MiddlewareBuilder for Mwhere M: Middleware + 'static,

§

fn wrap_into<F, T>(self, f: F) -> Twhere F: FnOnce(Self) -> T, T: Middleware,

Wraps self inside a new Middleware. Read more
§

fn with_signer<S>(self, s: S) -> SignerMiddleware<Self, S>where S: Signer,

Wraps self inside a SignerMiddleware. Read more
§

fn nonce_manager(self, address: H160) -> NonceManagerMiddleware<Self>

Wraps self inside a NonceManagerMiddleware. Read more
§

fn gas_oracle<G>(self, gas_oracle: G) -> GasOracleMiddleware<Self, G>where G: GasOracle,

Wraps self inside a GasOracleMiddleware. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more