pub trait EthBundleApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn send_bundle<'life0, 'async_trait>(
&'life0 self,
bundle: EthSendBundle,
) -> Pin<Box<dyn Future<Output = Result<EthBundleHash, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn call_bundle<'life0, 'async_trait>(
&'life0 self,
request: EthCallBundle,
) -> Pin<Box<dyn Future<Output = Result<EthCallBundleResponse, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn cancel_bundle<'life0, 'async_trait>(
&'life0 self,
request: CancelBundleRequest,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn send_private_transaction<'life0, 'async_trait>(
&'life0 self,
request: PrivateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn send_private_raw_transaction<'life0, 'async_trait>(
&'life0 self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn cancel_private_transaction<'life0, 'async_trait>(
&'life0 self,
request: CancelPrivateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the EthBundleApi
RPC API.
Required Methods§
Sourcefn send_bundle<'life0, 'async_trait>(
&'life0 self,
bundle: EthSendBundle,
) -> Pin<Box<dyn Future<Output = Result<EthBundleHash, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_bundle<'life0, 'async_trait>(
&'life0 self,
bundle: EthSendBundle,
) -> Pin<Box<dyn Future<Output = Result<EthBundleHash, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
eth_sendBundle
can be used to send your bundles to the builder.
Sourcefn call_bundle<'life0, 'async_trait>(
&'life0 self,
request: EthCallBundle,
) -> Pin<Box<dyn Future<Output = Result<EthCallBundleResponse, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn call_bundle<'life0, 'async_trait>(
&'life0 self,
request: EthCallBundle,
) -> Pin<Box<dyn Future<Output = Result<EthCallBundleResponse, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
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<'life0, 'async_trait>(
&'life0 self,
request: CancelBundleRequest,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn cancel_bundle<'life0, 'async_trait>(
&'life0 self,
request: CancelBundleRequest,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
eth_cancelBundle
is used to prevent a submitted bundle from being included on-chain. See bundle cancellations for more information.
Sourcefn send_private_transaction<'life0, 'async_trait>(
&'life0 self,
request: PrivateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_private_transaction<'life0, 'async_trait>(
&'life0 self,
request: PrivateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
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<'life0, 'async_trait>(
&'life0 self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_private_raw_transaction<'life0, 'async_trait>(
&'life0 self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<FixedBytes<32>, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
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<'life0, 'async_trait>(
&'life0 self,
request: CancelPrivateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn cancel_private_transaction<'life0, 'async_trait>(
&'life0 self,
request: CancelPrivateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
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.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.