pub struct EvmToEvmSpendRequest<'a, S: Signer + ?Sized, DP: Provider<DN> + ?Sized, DN: Network = Ethereum> {Show 14 fields
pub source_signer: &'a S,
pub source_chain_id: TidesChainId,
pub source_token: Address,
pub source_token_amount: U256,
pub source_max_fees: Option<U256>,
pub destination_provider: &'a DP,
pub destination_chain_id: TidesChainId,
pub destination_recipient: Address,
pub destination_token: Option<Address>,
pub destination_callback: Option<EvmDestinationCallback>,
pub destination_caller: Option<Address>,
pub max_block_height: Option<u64>,
pub salt: Option<FixedBytes32>,
pub _phantoms: PhantomData<DN>,
}Expand description
Represents a spend request where the balance is located in an EVM chain, and the spend is done on a destination chain which is also an EVM chain.
Fields§
§source_signer: &'a S§source_chain_id: TidesChainId§source_token: Address§source_token_amount: U256§source_max_fees: Option<U256>Optional source fees. Otherwise, pick the one suggested by the attester.
destination_provider: &'a DP§destination_chain_id: TidesChainId§destination_recipient: Address§destination_token: Option<Address>Can be kept empty. It’s useful only in case the source token maps to multiple destination tokens (eg: eth-USDT mapping to arbitrum-USDT & arbitrum-USDT0)
destination_callback: Option<EvmDestinationCallback>Optional callback.
destination_caller: Option<Address>Optional caller, if not provided defaults to source_signer.address().
max_block_height: Option<u64>Optional spend intent max validity height, if not provided the client will infer it.
salt: Option<FixedBytes32>Optional salt, if not provided the client will generate one.
_phantoms: PhantomData<DN>Optional salt, otherwise will be inferred.
Implementations§
Source§impl<'a, S, DP, DN> EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S, DP, DN> EvmToEvmSpendRequest<'a, S, DP, DN>
pub fn new( source_signer: &'a S, source_chain_id: TidesChainId, source_token: Address, source_token_amount: U256, destination_provider: &'a DP, destination_chain_id: TidesChainId, destination_recipient: Address, ) -> Self
pub fn with_destination_token(self, destination_token: Address) -> Self
pub fn with_destination_callback( self, destination_callback: EvmDestinationCallback, ) -> Self
Sourcepub fn with_source_chain_max_fees(self, max_fees: U256) -> Self
pub fn with_source_chain_max_fees(self, max_fees: U256) -> Self
Defines the chain’s source fees.
Sourcepub fn with_max_block_height(self, max_block_height: u64) -> Self
pub fn with_max_block_height(self, max_block_height: u64) -> Self
If provided, sets the spend intent’s max validity height.
pub fn with_destination_caller(self, destination_caller: Address) -> Self
pub fn with_salt(self, salt: impl Into<FixedBytes32>) -> Self
Trait Implementations§
Source§impl<'a, S: Clone + Signer + ?Sized, DP: Clone + Provider<DN> + ?Sized, DN: Clone + Network> Clone for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S: Clone + Signer + ?Sized, DP: Clone + Provider<DN> + ?Sized, DN: Clone + Network> Clone for EvmToEvmSpendRequest<'a, S, DP, DN>
Source§fn clone(&self) -> EvmToEvmSpendRequest<'a, S, DP, DN>
fn clone(&self) -> EvmToEvmSpendRequest<'a, S, DP, DN>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, S: Debug + Signer + ?Sized, DP: Debug + Provider<DN> + ?Sized, DN: Debug + Network> Debug for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S: Debug + Signer + ?Sized, DP: Debug + Provider<DN> + ?Sized, DN: Debug + Network> Debug for EvmToEvmSpendRequest<'a, S, DP, DN>
Source§impl<'a, S: PartialEq + Signer + ?Sized, DP: PartialEq + Provider<DN> + ?Sized, DN: PartialEq + Network> PartialEq for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S: PartialEq + Signer + ?Sized, DP: PartialEq + Provider<DN> + ?Sized, DN: PartialEq + Network> PartialEq for EvmToEvmSpendRequest<'a, S, DP, DN>
Source§fn eq(&self, other: &EvmToEvmSpendRequest<'a, S, DP, DN>) -> bool
fn eq(&self, other: &EvmToEvmSpendRequest<'a, S, DP, DN>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a, S: Eq + Signer + ?Sized, DP: Eq + Provider<DN> + ?Sized, DN: Eq + Network> Eq for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S: Signer + ?Sized, DP: Provider<DN> + ?Sized, DN: Network> StructuralPartialEq for EvmToEvmSpendRequest<'a, S, DP, DN>
Auto Trait Implementations§
impl<'a, S, DP, DN> Freeze for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S, DP, DN> RefUnwindSafe for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S, DP, DN> Send for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S, DP, DN> Sync for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S, DP, DN> Unpin for EvmToEvmSpendRequest<'a, S, DP, DN>
impl<'a, S, DP, DN> UnwindSafe for EvmToEvmSpendRequest<'a, S, DP, DN>
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> 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<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
Compare self to
key and return true if they are equal.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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request