pub struct BundleRequest { /* private fields */ }
Expand description

A bundle that can be submitted to a Flashbots relay.

The bundle can include your own transactions and transactions from the mempool.

Additionally, this bundle can be simulated through a relay if simulation parameters are provided using BundleRequest::set_simulation_block and BundleRequest::set_simulation_timestamp.

Please note that some parameters are required, and submitting a bundle without them will get it rejected pre-flight. The required parameters include:

Implementations§

Creates an empty bundle request.

Adds a transaction to the bundle request.

Transactions added to the bundle can either be novel transactions, i.e. transactions that you have crafted, or they can be from one of the mempool APIs.

Adds a revertible transaction to the bundle request.

This differs from BundleRequest::push_transaction in that the bundle will still be considered valid if the transaction reverts.

Get a reference to the transactions currently in the bundle request.

Get a list of transaction hashes in the bundle request.

Get the target block (if any).

Set the target block of the bundle.

Get the block that determines the state for bundle simulation (if any).

See eth_callBundle in the Flashbots documentation for more information on bundle simulations.

Set the block that determines the state for bundle simulation.

Get the UNIX timestamp used for bundle simulation (if any).

See eth_callBundle in the Flashbots documentation for more information on bundle simulations.

Set the UNIX timestamp used for bundle simulation.

Get the base gas fee for bundle simulation (if any).

See eth_callBundle in the Flashbots documentation for more information on bundle simulations.

Set the base gas fee for bundle simulation (if any). Optional: will default to a value chosen by the node if not specified.

Get the minimum timestamp for which this bundle is valid (if any), in seconds since the UNIX epoch.

Set the minimum timestamp for which this bundle is valid (if any), in seconds since the UNIX epoch.

Get the maximum timestamp for which this bundle is valid (if any), in seconds since the UNIX epoch.

Set the maximum timestamp for which this bundle is valid (if any), in seconds since the UNIX epoch.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more