pub struct SpendAttestation<T> { /* private fields */ }Expand description
A spend attestation ready to be executed on-chain.
Obtained from TridentClient::spend. Call
send to submit the transaction; await .get_receipt() on the
returned builder to block until inclusion.
Implementations§
Source§impl<T> SpendAttestation<T>
impl<T> SpendAttestation<T>
Sourcepub fn spend_spec_hash(&self) -> [u8; 32]
pub fn spend_spec_hash(&self) -> [u8; 32]
Returns the canonical spend spec hash that identifies this attestation.
Source§impl SpendAttestation<Address>
impl SpendAttestation<Address>
Sourcepub async fn send(self) -> Result<PendingTransactionBuilder<AnyNetwork>, Error>
pub async fn send(self) -> Result<PendingTransactionBuilder<AnyNetwork>, Error>
Sourcepub fn into_call(self) -> EvmCallContext
pub fn into_call(self) -> EvmCallContext
Consumes the attestation and returns the raw pieces needed to execute
tridentSpend: the delivery-contract address, the prepared SolCall,
and the live provider.
Use this when you want custom ordering against MulticallBuilder —
e.g. pre-spend calls, interleaving, or calling aggregate3_calldata()
yourself.
Sourcepub fn chain<C: SolCall>(self, contract: Address, call: &C) -> SpendMulticall
pub fn chain<C: SolCall>(self, contract: Address, call: &C) -> SpendMulticall
Returns a SpendMulticall whose first entry is this attestation’s
tridentSpend call and whose second entry is call against
contract (zero value, run after the spend).
The returned wrapper carries this attestation’s provider so the caller
can just .send().await without rethreading one.
Convenience for “spend + one follow-up” flows. For pre-spend calls or
any other ordering, use into_call and compose a
MulticallBuilder yourself.
Sourcepub fn chain_value<C: SolCall>(
self,
contract: Address,
call: &C,
value: U256,
) -> SpendMulticall
pub fn chain_value<C: SolCall>( self, contract: Address, call: &C, value: U256, ) -> SpendMulticall
Like chain but forwards value wei to contract on
the follow-up call.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SpendAttestation<T>
impl<T> !UnwindSafe for SpendAttestation<T>
impl<T> Freeze for SpendAttestation<T>where
PhantomData<T>: Freeze,
impl<T> Send for SpendAttestation<T>where
PhantomData<T>: Send,
impl<T> Sync for SpendAttestation<T>where
PhantomData<T>: Sync,
impl<T> Unpin for SpendAttestation<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for SpendAttestation<T>where
PhantomData<T>: UnsafeUnpin,
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request