pub struct ConditionalOrderParams {
pub handler: Address,
pub salt: B256,
pub static_input: Vec<u8>,
}Expand description
ABI-encoded parameters identifying a conditional order on-chain.
Fields§
§handler: AddressAddress of the handler contract that validates the order.
salt: B25632-byte salt providing uniqueness per order.
static_input: Vec<u8>ABI-encoded static input consumed by the handler.
Implementations§
Source§impl ConditionalOrderParams
impl ConditionalOrderParams
Sourcepub const fn new(handler: Address, salt: B256, static_input: Vec<u8>) -> Self
pub const fn new(handler: Address, salt: B256, static_input: Vec<u8>) -> Self
Construct ConditionalOrderParams from its three constituent fields.
§Arguments
handler- Address of the handler contract that validates the order.salt- 32-byte salt providing uniqueness per order.static_input- ABI-encoded static input consumed by the handler.
§Returns
A new ConditionalOrderParams instance.
Sourcepub const fn with_handler(self, handler: Address) -> Self
pub const fn with_handler(self, handler: Address) -> Self
Override the handler contract address.
§Arguments
handler- The new handler contract address.
§Returns
The modified ConditionalOrderParams with the updated handler (builder pattern).
Sourcepub const fn with_salt(self, salt: B256) -> Self
pub const fn with_salt(self, salt: B256) -> Self
Override the 32-byte salt.
§Arguments
salt- The new 32-byte salt value.
§Returns
The modified ConditionalOrderParams with the updated salt (builder pattern).
Sourcepub fn with_static_input(self, static_input: Vec<u8>) -> Self
pub fn with_static_input(self, static_input: Vec<u8>) -> Self
Override the ABI-encoded static input.
§Arguments
static_input- The new ABI-encoded static input bytes.
§Returns
The modified ConditionalOrderParams with the updated static input (builder pattern).
Sourcepub const fn is_empty_static_input(&self) -> bool
pub const fn is_empty_static_input(&self) -> bool
Returns true if the static input bytes are empty.
§Returns
true if the static_input field contains zero bytes, false otherwise.
Sourcepub const fn static_input_len(&self) -> usize
pub const fn static_input_len(&self) -> usize
Returns the length of the static input bytes.
§Returns
The number of bytes in the static_input field.
Trait Implementations§
Source§impl Clone for ConditionalOrderParams
impl Clone for ConditionalOrderParams
Source§fn clone(&self) -> ConditionalOrderParams
fn clone(&self) -> ConditionalOrderParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConditionalOrderParams
impl Debug for ConditionalOrderParams
Source§impl<'de> Deserialize<'de> for ConditionalOrderParams
impl<'de> Deserialize<'de> for ConditionalOrderParams
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 Display for ConditionalOrderParams
impl Display for ConditionalOrderParams
Source§impl PartialEq for ConditionalOrderParams
impl PartialEq for ConditionalOrderParams
Source§impl Serialize for ConditionalOrderParams
impl Serialize for ConditionalOrderParams
impl Eq for ConditionalOrderParams
impl StructuralPartialEq for ConditionalOrderParams
Auto Trait Implementations§
impl Freeze for ConditionalOrderParams
impl RefUnwindSafe for ConditionalOrderParams
impl Send for ConditionalOrderParams
impl Sync for ConditionalOrderParams
impl Unpin for ConditionalOrderParams
impl UnsafeUnpin for ConditionalOrderParams
impl UnwindSafe for ConditionalOrderParams
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§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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.