pub struct SponsoredFeePaymentMethod { /* private fields */ }Expand description
A fee payment method where a sponsor contract pays the fee unconditionally.
This is the simplest strategy — useful for testing, development, and
gasless transaction experiences. The sponsor contract must be pre-funded
with Fee Juice and expose a sponsor_unconditionally() private function.
Implementations§
Source§impl SponsoredFeePaymentMethod
impl SponsoredFeePaymentMethod
Sourcepub fn new(payment_contract: AztecAddress) -> SponsoredFeePaymentMethod
pub fn new(payment_contract: AztecAddress) -> SponsoredFeePaymentMethod
Create a new sponsored fee payment method.
payment_contract is the address of the sponsor contract that will pay fees.
Trait Implementations§
Source§impl FeePaymentMethod for SponsoredFeePaymentMethod
impl FeePaymentMethod for SponsoredFeePaymentMethod
Source§fn get_asset<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
SponsoredFeePaymentMethod: 'async_trait,
fn get_asset<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
SponsoredFeePaymentMethod: 'async_trait,
Returns the address of the asset used for fee payment.
For fee juice methods, this is the FeeJuice protocol contract address.
Source§fn get_fee_payer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
SponsoredFeePaymentMethod: 'async_trait,
fn get_fee_payer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
SponsoredFeePaymentMethod: 'async_trait,
Returns the address of the entity paying the fee.
Source§fn get_fee_execution_payload<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ExecutionPayload, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
SponsoredFeePaymentMethod: 'async_trait,
fn get_fee_execution_payload<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ExecutionPayload, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
SponsoredFeePaymentMethod: 'async_trait,
Builds an
ExecutionPayload containing the function calls and
auth witnesses needed to pay the transaction fee.Auto Trait Implementations§
impl Freeze for SponsoredFeePaymentMethod
impl RefUnwindSafe for SponsoredFeePaymentMethod
impl Send for SponsoredFeePaymentMethod
impl Sync for SponsoredFeePaymentMethod
impl Unpin for SponsoredFeePaymentMethod
impl UnwindSafe for SponsoredFeePaymentMethod
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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