pub struct Wasm<'a> { /* private fields */ }
Implementations
sourceimpl 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> !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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more