Struct stacks_rs::api::ContractsApi
source · pub struct ContractsApi<T: Network> { /* private fields */ }Implementations§
source§impl<T: Network> ContractsApi<T>
impl<T: Network> ContractsApi<T>
pub fn new(network: T) -> Self
sourcepub async fn call_read_only(
&self,
contract: impl Into<String>,
contract_name: impl Into<String>,
function_name: impl Into<String>,
function_args: impl Into<Vec<ClarityValue>>,
sender_address: Option<String>
) -> Result<ClarityValue, Error>
pub async fn call_read_only( &self, contract: impl Into<String>, contract_name: impl Into<String>, function_name: impl Into<String>, function_args: impl Into<Vec<ClarityValue>>, sender_address: Option<String> ) -> Result<ClarityValue, Error>
Calls a read-only function on a contract. Returns a deserialized CV.
§Arguments
contract- The contract address.contract_name- The contract name.function_name- The function name.function_args- The function arguments.sender_address- (OPTIONAL) The sender address, defaults to the contract address.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ContractsApi<T>
impl<T> Send for ContractsApi<T>where
T: Send,
impl<T> Sync for ContractsApi<T>where
T: Sync,
impl<T> Unpin for ContractsApi<T>where
T: Unpin,
impl<T> !UnwindSafe for ContractsApi<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