pub struct ContractCall<T> { /* private fields */ }Implementations§
Source§impl<T> ContractCall<T>
impl<T> ContractCall<T>
pub fn with_user(self, account: &Account) -> Self
pub fn args(self, args: Vec<u8>) -> Self
Sourcepub fn args_json<U: Serialize>(self, args: U) -> Result<Self>
pub fn args_json<U: Serialize>(self, args: U) -> Result<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 deposit(self, deposit: NearToken) -> Self
pub fn deposit(self, deposit: NearToken) -> Self
Specify the amount of tokens to be deposited where deposit is the amount of
tokens in yocto near.
pub fn gas(self, gas: Gas) -> Self
Source§impl<T: Send + DeserializeOwned> ContractCall<T>
impl<T: Send + DeserializeOwned> ContractCall<T>
pub async fn result(self) -> Result<ExecutionSuccess, ExecutionFailure>
pub async fn expect_error(self, error_message: &str) -> Result<()>
pub async fn expect_log(self, log: &str) -> Result<()>
pub async fn dont_expect_log(self, log: &str) -> Result<()>
Trait Implementations§
Source§impl<T: Send + Sync + DeserializeOwned + 'static> IntoFuture for ContractCall<T>
impl<T: Send + Sync + DeserializeOwned + 'static> IntoFuture for ContractCall<T>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <ContractCall<T> as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <ContractCall<T> as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<T> Freeze for ContractCall<T>
impl<T> !RefUnwindSafe for ContractCall<T>
impl<T> Send for ContractCall<T>where
T: Send,
impl<T> Sync for ContractCall<T>where
T: Sync,
impl<T> Unpin for ContractCall<T>where
T: Unpin,
impl<T> !UnwindSafe for ContractCall<T>
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