pub trait EthBundleApiClient: ClientT {
// Provided methods
fn send_bundle(
&self,
bundle: EthSendBundle,
) -> impl Future<Output = Result<EthBundleHash, Error>> + Send { ... }
fn call_bundle(
&self,
request: EthCallBundle,
) -> impl Future<Output = Result<EthCallBundleResponse, Error>> + Send { ... }
fn cancel_bundle(
&self,
request: EthCancelBundle,
) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn send_private_transaction(
&self,
request: EthSendPrivateTransaction,
) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send { ... }
fn send_private_raw_transaction(
&self,
bytes: Bytes,
) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send { ... }
fn cancel_private_transaction(
&self,
request: EthCancelPrivateTransaction,
) -> impl Future<Output = Result<bool, Error>> + Send { ... }
}client and rpc only.Expand description
Client implementation for the EthBundleApi RPC API.
Provided Methods§
Sourcefn send_bundle(
&self,
bundle: EthSendBundle,
) -> impl Future<Output = Result<EthBundleHash, Error>> + Send
fn send_bundle( &self, bundle: EthSendBundle, ) -> impl Future<Output = Result<EthBundleHash, Error>> + Send
eth_sendBundle can be used to send your bundles to the builder.
Sourcefn call_bundle(
&self,
request: EthCallBundle,
) -> impl Future<Output = Result<EthCallBundleResponse, Error>> + Send
fn call_bundle( &self, request: EthCallBundle, ) -> impl Future<Output = Result<EthCallBundleResponse, Error>> + Send
eth_callBundle can be used to simulate a bundle against a specific block number,
including simulating a bundle at the top of the next block.
Sourcefn cancel_bundle(
&self,
request: EthCancelBundle,
) -> impl Future<Output = Result<(), Error>> + Send
fn cancel_bundle( &self, request: EthCancelBundle, ) -> impl Future<Output = Result<(), Error>> + Send
eth_cancelBundle is used to prevent a submitted bundle from being included on-chain. See bundle cancellations for more information.
Sourcefn send_private_transaction(
&self,
request: EthSendPrivateTransaction,
) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send
fn send_private_transaction( &self, request: EthSendPrivateTransaction, ) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send
eth_sendPrivateTransaction is used to send a single transaction to Flashbots. Flashbots will attempt to build a block including the transaction for the next 25 blocks. See Private Transactions for more info.
Sourcefn send_private_raw_transaction(
&self,
bytes: Bytes,
) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send
fn send_private_raw_transaction( &self, bytes: Bytes, ) -> impl Future<Output = Result<FixedBytes<32>, Error>> + Send
The eth_sendPrivateRawTransaction method can be used to send private transactions to
the RPC endpoint. Private transactions are protected from frontrunning and kept
private until included in a block. A request to this endpoint needs to follow
the standard eth_sendRawTransaction
Sourcefn cancel_private_transaction(
&self,
request: EthCancelPrivateTransaction,
) -> impl Future<Output = Result<bool, Error>> + Send
fn cancel_private_transaction( &self, request: EthCancelPrivateTransaction, ) -> impl Future<Output = Result<bool, Error>> + Send
The eth_cancelPrivateTransaction method stops private transactions from being
submitted for future blocks.
A transaction can only be cancelled if the request is signed by the same key as the
eth_sendPrivateTransaction call submitting the transaction in first place.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".