Struct near_fetch::ops::FunctionCallTransaction
source · pub struct FunctionCallTransaction<'a, S> { /* private fields */ }Implementations§
source§impl<S> FunctionCallTransaction<'_, S>
impl<S> FunctionCallTransaction<'_, S>
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<'a, S> FunctionCallTransaction<'a, S>where
S: Signer + ExposeAccountId + 'static,
impl<'a, S> FunctionCallTransaction<'a, S>where S: Signer + ExposeAccountId + 'static,
sourcepub async fn transact(self) -> Result<FinalExecutionOutcomeView>
pub async fn transact(self) -> Result<FinalExecutionOutcomeView>
Process the transaction, and return the result of the execution.
sourcepub async fn transact_async(self) -> Result<CryptoHash>
pub async fn transact_async(self) -> Result<CryptoHash>
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.
Auto Trait Implementations§
impl<'a, S> !RefUnwindSafe for FunctionCallTransaction<'a, S>
impl<'a, S> Send for FunctionCallTransaction<'a, S>where S: Send,
impl<'a, S> Sync for FunctionCallTransaction<'a, S>where S: Sync,
impl<'a, S> Unpin for FunctionCallTransaction<'a, S>where S: Unpin,
impl<'a, S> !UnwindSafe for FunctionCallTransaction<'a, S>
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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> 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