pub struct PaymentVaultHandler<P, N>{
pub contract: IPaymentVaultInstance<P, N>,
}Fields§
§contract: IPaymentVaultInstance<P, N>Implementations§
Source§impl<P, N> PaymentVaultHandler<P, N>
impl<P, N> PaymentVaultHandler<P, N>
Sourcepub fn new(contract_address: Address, provider: P) -> PaymentVaultHandler<P, N>
pub fn new(contract_address: Address, provider: P) -> PaymentVaultHandler<P, N>
Create a new PaymentVaultHandler instance from a (proxy) contract’s address
Sourcepub fn set_provider(&mut self, provider: P)
pub fn set_provider(&mut self, provider: P)
Set the provider
Sourcepub async fn get_quote<I>(&self, metrics: I) -> Result<Vec<Uint<256, 4>>, Error>
pub async fn get_quote<I>(&self, metrics: I) -> Result<Vec<Uint<256, 4>>, Error>
Fetch a quote from the contract
Sourcepub async fn pay_for_quotes<I>(
&self,
data_payments: I,
transaction_config: &TransactionConfig,
) -> Result<FixedBytes<32>, Error>
pub async fn pay_for_quotes<I>( &self, data_payments: I, transaction_config: &TransactionConfig, ) -> Result<FixedBytes<32>, Error>
Pay for quotes.
Sourcepub fn pay_for_quotes_calldata<I>(
&self,
data_payments: I,
) -> Result<(Bytes, Address), Error>
pub fn pay_for_quotes_calldata<I>( &self, data_payments: I, ) -> Result<(Bytes, Address), Error>
Returns the pay for quotes transaction calldata.
Sourcepub async fn verify_payment<I>(
&self,
payment_verifications: I,
) -> Result<[PaymentVerificationResult; 3], Error>
pub async fn verify_payment<I>( &self, payment_verifications: I, ) -> Result<[PaymentVerificationResult; 3], Error>
Verify if payments are valid
Auto Trait Implementations§
impl<P, N> Freeze for PaymentVaultHandler<P, N>where
P: Freeze,
impl<P, N> RefUnwindSafe for PaymentVaultHandler<P, N>where
P: RefUnwindSafe,
N: RefUnwindSafe,
impl<P, N> Send for PaymentVaultHandler<P, N>
impl<P, N> Sync for PaymentVaultHandler<P, N>
impl<P, N> Unpin for PaymentVaultHandler<P, N>
impl<P, N> UnwindSafe for PaymentVaultHandler<P, N>where
P: UnwindSafe,
N: UnwindSafe,
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> 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