pub struct BaseContract<T: Middleware> { /* private fields */ }Implementations§
Source§impl<T: Middleware> BaseContract<T>
impl<T: Middleware> BaseContract<T>
pub fn new(address: ZilAddress, client: Arc<T>) -> Self
pub fn connect<S: Signer>(&self, client: Arc<T>) -> Self
Sourcepub async fn call(
&self,
transition: &str,
args: Vec<ScillaVariable>,
overridden_params: Option<TransactionParams>,
) -> Result<GetTransactionResponse, Error>
pub async fn call( &self, transition: &str, args: Vec<ScillaVariable>, overridden_params: Option<TransactionParams>, ) -> Result<GetTransactionResponse, Error>
Call a transition of the contract.
Arguments:
transition: A string representing the name of the transition to be called.args: A vector of ScillaVariable objects, which represents the arguments to be passed to the transition being called.overridden_params: An optional parameter that allows you to override the default transaction parameters. If not provided, it will use the default transaction parameters.
Sourcepub async fn get_field<F: FromStr>(&self, field_name: &str) -> Result<F, Error>
pub async fn get_field<F: FromStr>(&self, field_name: &str) -> Result<F, Error>
The function get_field retrieves a specific field from a smart contract state and parses it into a
specified type.
Arguments:
field_name: Thefield_nameparameter is a string that represents the name of the field you want to retrieve from the smart contract state.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for BaseContract<T>
impl<T> RefUnwindSafe for BaseContract<T>where
T: RefUnwindSafe,
impl<T> Send for BaseContract<T>
impl<T> Sync for BaseContract<T>
impl<T> Unpin for BaseContract<T>
impl<T> UnwindSafe for BaseContract<T>where
T: RefUnwindSafe,
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