Type Alias ConditionalOptions
pub type ConditionalOptions = TransactionConditional;
TransactionConditional
insteadExpand description
Alias for backwards compat
Aliased Type§
struct ConditionalOptions {
pub known_accounts: HashMap<Address, AccountStorage, FbBuildHasher<20>>,
pub block_number_min: Option<u64>,
pub block_number_max: Option<u64>,
pub timestamp_min: Option<u64>,
pub timestamp_max: Option<u64>,
}
Fields§
§known_accounts: HashMap<Address, AccountStorage, FbBuildHasher<20>>
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<u64>
The minimal block number at which the transaction can be included.
None
indicates no minimum block number constraint.
block_number_max: Option<u64>
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.
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: 104 bytes
Implementations
§impl TransactionConditional
impl TransactionConditional
pub 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
pub const fn has_exceeded_block_number(&self, block_number: u64) -> bool
pub const fn has_exceeded_block_number(&self, block_number: u64) -> bool
Returns true if the configured max block number is lower or equal to the given
block_number
pub 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
pub 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.
pub const fn matches_block_number(&self, block_number: u64) -> bool
pub const fn matches_block_number(&self, block_number: u64) -> bool
Returns true
if the transaction matches the given block number.
pub 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
§impl Clone for TransactionConditional
impl Clone for TransactionConditional
§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 more