pub struct SimulatePayload<TxReq = TransactionRequest> {
pub block_state_calls: Vec<SimBlock<TxReq>>,
pub trace_transfers: bool,
pub validation: bool,
pub return_full_transactions: bool,
}Expand description
Simulation options for executing multiple blocks and transactions.
This struct configures how simulations are executed, including whether to trace token transfers,
validate transaction sequences, and whether to return full transaction objects.
The RPC accepts at most MAX_SIMULATE_BLOCKS blocks; this type and its builder methods do not
enforce that limit.
Fields§
§block_state_calls: Vec<SimBlock<TxReq>>Array of block state calls to be executed at specific, optional block/state.
trace_transfers: boolFlag to determine whether to trace ERC20/ERC721 token transfers within transactions.
validation: boolFlag to enable or disable validation of the transaction sequence in the blocks.
return_full_transactions: boolFlag to decide if full transactions should be returned instead of just their hashes.
Implementations§
Source§impl<TxReq> SimulatePayload<TxReq>
impl<TxReq> SimulatePayload<TxReq>
Sourcepub fn extend_blocks(
self,
blocks: impl IntoIterator<Item = SimBlock<TxReq>>,
) -> Self
pub fn extend_blocks( self, blocks: impl IntoIterator<Item = SimBlock<TxReq>>, ) -> Self
Adds multiple blocks to the simulation payload.
Sourcepub const fn with_trace_transfers(self) -> Self
pub const fn with_trace_transfers(self) -> Self
Enables tracing of token transfers.
Sourcepub const fn with_validation(self) -> Self
pub const fn with_validation(self) -> Self
Enables validation of the transaction sequence.
Sourcepub const fn with_full_transactions(self) -> Self
pub const fn with_full_transactions(self) -> Self
Enables returning full transactions.
Trait Implementations§
Source§impl<TxReq: Clone> Clone for SimulatePayload<TxReq>
impl<TxReq: Clone> Clone for SimulatePayload<TxReq>
Source§fn clone(&self) -> SimulatePayload<TxReq>
fn clone(&self) -> SimulatePayload<TxReq>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<TxReq: Debug> Debug for SimulatePayload<TxReq>
impl<TxReq: Debug> Debug for SimulatePayload<TxReq>
Source§impl<TxReq> Default for SimulatePayload<TxReq>
impl<TxReq> Default for SimulatePayload<TxReq>
Source§impl<'de, TxReq> Deserialize<'de> for SimulatePayload<TxReq>where
TxReq: Deserialize<'de>,
Available on crate feature serde only.
impl<'de, TxReq> Deserialize<'de> for SimulatePayload<TxReq>where
TxReq: Deserialize<'de>,
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl<TxReq> Freeze for SimulatePayload<TxReq>
impl<TxReq> RefUnwindSafe for SimulatePayload<TxReq>
impl<TxReq> Send for SimulatePayload<TxReq>
impl<TxReq> Sync for SimulatePayload<TxReq>
impl<TxReq> Unpin for SimulatePayload<TxReq>
impl<TxReq> UnsafeUnpin for SimulatePayload<TxReq>
impl<TxReq> UnwindSafe for SimulatePayload<TxReq>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes