pub struct TransactionConditional {
pub known_accounts: AddressHashMap<AccountStorage>,
pub block_number_min: Option<BlockNumber>,
pub block_number_max: Option<BlockNumber>,
pub timestamp_min: Option<u64>,
pub timestamp_max: Option<u64>,
}
Expand description
Options for conditional raw transaction submissions.
TransactionConditional represents the preconditions that determine the inclusion of the transaction, enforced out-of-protocol by the sequencer.
Fields§
§known_accounts: AddressHashMap<AccountStorage>
A map of account addresses to their expected storage states. Each account can have a specified storage root or explicit slot-value pairs.
block_number_min: Option<BlockNumber>
The minimal block number at which the transaction can be included.
None
indicates no minimum block number constraint.
block_number_max: Option<BlockNumber>
The maximal block number at which the transaction can be included.
None
indicates no maximum block number constraint.
timestamp_min: Option<u64>
The minimal timestamp at which the transaction can be included.
None
indicates no minimum timestamp constraint.
timestamp_max: Option<u64>
The maximal timestamp at which the transaction can be included.
None
indicates no maximum timestamp constraint.
Implementations§
source§impl TransactionConditional
impl TransactionConditional
sourcepub const fn matches_block_attributes(
&self,
block: &BlockConditionalAttributes,
) -> bool
pub const fn matches_block_attributes( &self, block: &BlockConditionalAttributes, ) -> bool
Returns true
if the transaction matches the given block attributes.
sourcepub const fn matches_block_number(&self, block_number: BlockNumber) -> bool
pub const fn matches_block_number(&self, block_number: BlockNumber) -> bool
Returns true
if the transaction matches the given block number.
sourcepub const fn matches_timestamp(&self, timestamp: u64) -> bool
pub const fn matches_timestamp(&self, timestamp: u64) -> bool
Returns true
if the transaction matches the given timestamp.
Trait Implementations§
source§impl Clone for TransactionConditional
impl Clone for TransactionConditional
source§fn clone(&self) -> TransactionConditional
fn clone(&self) -> TransactionConditional
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TransactionConditional
impl Debug for TransactionConditional
source§impl Default for TransactionConditional
impl Default for TransactionConditional
source§fn default() -> TransactionConditional
fn default() -> TransactionConditional
source§impl<'de> Deserialize<'de> for TransactionConditional
impl<'de> Deserialize<'de> for TransactionConditional
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 Freeze for TransactionConditional
impl RefUnwindSafe for TransactionConditional
impl Send for TransactionConditional
impl Sync for TransactionConditional
impl Unpin for TransactionConditional
impl UnwindSafe for TransactionConditional
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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 more