pub struct FunctionCallTransaction<'a> { /* private fields */ }Implementations§
source§impl FunctionCallTransaction<'_>
impl FunctionCallTransaction<'_>
sourcepub fn args(self, args: Vec<u8>) -> Self
pub fn args(self, args: Vec<u8>) -> Self
Provide the arguments for the call. These args are serialized bytes from either
a JSON or Borsh serializable set of arguments. To use the more specific versions
with better quality of life, use args_json or args_borsh.
sourcepub fn args_json<U: Serialize>(self, args: U) -> Self
pub fn args_json<U: Serialize>(self, args: U) -> Self
Similar to args, specify an argument that is JSON serializable and can be
accepted by the equivalent contract. Recommend to use something like
serde_json::json! macro to easily serialize the arguments.
sourcepub fn args_borsh<U: BorshSerialize>(self, args: U) -> Self
pub fn args_borsh<U: BorshSerialize>(self, args: U) -> Self
Similar to args, specify an argument that is borsh serializable and can be
accepted by the equivalent contract.
source§impl FunctionCallTransaction<'_>
impl FunctionCallTransaction<'_>
sourcepub async fn transact(self) -> Result<ExecutionFinalResult>
pub async fn transact(self) -> Result<ExecutionFinalResult>
Process the transaction, and return the result of the execution.
sourcepub async fn transact_async(self) -> Result<AsyncTransactionStatus>
pub async fn transact_async(self) -> Result<AsyncTransactionStatus>
Send the transaction to the network to be processed. This will be done asynchronously
without waiting for the transaction to complete. This returns us a [TransactionStatus]
for which we can call into [status] and/or .await to retrieve info about whether
the transaction has been completed or not. Note that .await will wait till completion
of the transaction.
sourcepub fn retry_exponential(self, base_millis: u64, max_retries: usize) -> Self
pub fn retry_exponential(self, base_millis: u64, max_retries: usize) -> Self
Retry this transactions if it fails. This will retry the transaction with exponential backoff. This cannot be used in combination with
sourcepub fn retry(
self,
strategy: impl Iterator<Item = Duration> + Send + Sync + 'static,
) -> Self
pub fn retry( self, strategy: impl Iterator<Item = Duration> + Send + Sync + 'static, ) -> Self
Retry this transactions if it fails. This will retry the transaction with the provided retry strategy.
sourcepub fn wait_until(self, wait_until: TxExecutionStatus) -> Self
pub fn wait_until(self, wait_until: TxExecutionStatus) -> Self
Specifies the status to wait until the transaction reaches in the network. The default
value is TxExecutionStatus::ExecutedOptimistic if not specified by this function.
Auto Trait Implementations§
impl<'a> Freeze for FunctionCallTransaction<'a>
impl<'a> !RefUnwindSafe for FunctionCallTransaction<'a>
impl<'a> Send for FunctionCallTransaction<'a>
impl<'a> Sync for FunctionCallTransaction<'a>
impl<'a> Unpin for FunctionCallTransaction<'a>
impl<'a> !UnwindSafe for FunctionCallTransaction<'a>
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 more