pub enum SwapPayload {
Fynd(Box<FyndPayload>),
Turbine(TurbinePayload),
}Expand description
A payload that needs to be signed before a swap can be executed.
Use signing_hash to obtain the bytes to sign, then pass the resulting
alloy::primitives::Signature to SignedSwap::assemble.
Only the Fynd variant is currently executable; calling methods on the
Turbine variant will panic with unimplemented!.
Variants§
Fynd(Box<FyndPayload>)
Fynd execution path — an EIP-1559 transaction targeting the RouterV3 contract.
Turbine(TurbinePayload)
Turbine execution path — not yet implemented.
Implementations§
Source§impl SwapPayload
impl SwapPayload
Sourcepub fn signing_hash(&self) -> B256
pub fn signing_hash(&self) -> B256
Returns the 32-byte hash that must be signed.
For the Fynd path this is the EIP-1559 transaction’s signature_hash().
§Panics
Panics if called on the Turbine variant.
Sourcepub fn typed_data(&self) -> Option<&TypedData>
pub fn typed_data(&self) -> Option<&TypedData>
Returns EIP-712 typed data for wallets that support eth_signTypedData_v4.
Always returns None for EIP-1559 transactions (Fynd path); those use
signing_hash instead.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SwapPayload
impl RefUnwindSafe for SwapPayload
impl Send for SwapPayload
impl Sync for SwapPayload
impl Unpin for SwapPayload
impl UnsafeUnpin for SwapPayload
impl UnwindSafe for SwapPayload
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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