pub struct Wasm<'a> { /* private fields */ }
Implementations§
Source§impl Wasm<'_>
impl Wasm<'_>
pub fn create(terra: &Terra) -> Wasm<'_>
pub async fn codes( &self, code_id: u64, ) -> Result<WasmCodeResult, TerraRustAPIError>
pub async fn info( &self, contract_address: &str, ) -> Result<WasmContractInfoResult, TerraRustAPIError>
pub async fn parameters(&self) -> Result<WasmParameterResult, TerraRustAPIError>
pub async fn query<T: for<'de> Deserialize<'de>>( &self, contract_address: &str, json_query: &str, ) -> Result<T, TerraRustAPIError>
pub async fn query_raw( &self, contract_address: &str, key: &str, sub_key: &Option<String>, ) -> Result<(String, String), TerraRustAPIError>
Sourcepub async fn store<C: Signing>(
&self,
secp: &Secp256k1<C>,
from: &PrivateKey,
wasm: &str,
memo: Option<String>,
) -> Result<TXResultSync, TerraRustAPIError>
pub async fn store<C: Signing>( &self, secp: &Secp256k1<C>, from: &PrivateKey, wasm: &str, memo: Option<String>, ) -> Result<TXResultSync, TerraRustAPIError>
store a wasm file onto the chain.
Sourcepub async fn instantiate<C: Signing>(
&self,
secp: &Secp256k1<C>,
from: &PrivateKey,
code_id: u64,
json: String,
coins: Vec<Coin>,
admin: Option<String>,
memo: Option<String>,
) -> Result<TXResultSync, TerraRustAPIError>
pub async fn instantiate<C: Signing>( &self, secp: &Secp256k1<C>, from: &PrivateKey, code_id: u64, json: String, coins: Vec<Coin>, admin: Option<String>, memo: Option<String>, ) -> Result<TXResultSync, TerraRustAPIError>
create a contract using code_id, json init args, and optionally admin on the chain
Sourcepub async fn migrate<C: Signing>(
&self,
secp: &Secp256k1<C>,
from: &PrivateKey,
contract: &str,
new_code_id: u64,
migrate: Option<String>,
memo: Option<String>,
) -> Result<TXResultSync, TerraRustAPIError>
pub async fn migrate<C: Signing>( &self, secp: &Secp256k1<C>, from: &PrivateKey, contract: &str, new_code_id: u64, migrate: Option<String>, memo: Option<String>, ) -> Result<TXResultSync, TerraRustAPIError>
migrate an existing contract to new_code_id, optionally with a migrate args
Auto Trait Implementations§
impl<'a> Freeze for Wasm<'a>
impl<'a> !RefUnwindSafe for Wasm<'a>
impl<'a> Send for Wasm<'a>
impl<'a> Sync for Wasm<'a>
impl<'a> Unpin for Wasm<'a>
impl<'a> !UnwindSafe for Wasm<'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
Mutably borrows from an owned value. Read more