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 has_exceeded_block_attributes(
&self,
block: &BlockConditionalAttributes,
) -> bool
pub const fn has_exceeded_block_attributes( &self, block: &BlockConditionalAttributes, ) -> bool
Returns true if any configured block parameter (timestamp_max
, block_number_max
) are
exceeded by the given block parameter.
E.g. the block parameter’s timestamp is higher than the configured block_number_max
Sourcepub const fn has_exceeded_block_number(&self, block_number: BlockNumber) -> bool
pub const fn has_exceeded_block_number(&self, block_number: BlockNumber) -> bool
Returns true if the configured max block number is lower or equal to the given
block_number
Sourcepub const fn has_exceeded_timestamp(&self, timestamp: u64) -> bool
pub const fn has_exceeded_timestamp(&self, timestamp: u64) -> bool
Returns true if the configured max timestamp is lower or equal to the given timestamp
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>,
Source§impl PartialEq for TransactionConditional
impl PartialEq for TransactionConditional
Source§impl Serialize for TransactionConditional
impl Serialize for TransactionConditional
impl Eq for TransactionConditional
impl StructuralPartialEq for TransactionConditional
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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