pub trait CwClient {
type Address: AsRef<str>;
type Query: ToString;
type RawQuery: ToHex;
type ChainId: AsRef<str>;
type Error;
// Required methods
fn query_smart<'life0, 'life1, 'async_trait, R>(
&'life0 self,
contract: &'life1 Self::Address,
query: Self::Query,
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>>
where R: 'async_trait + DeserializeOwned + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query_raw<'life0, 'life1, 'async_trait, R>(
&'life0 self,
contract: &'life1 Self::Address,
query: Self::RawQuery,
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>>
where R: 'async_trait + DeserializeOwned + Default,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query_tx<R: DeserializeOwned + Default>(
&self,
txhash: &str,
) -> Result<R, Self::Error>;
fn tx_execute<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, M>(
&'life0 self,
contract: &'life1 Self::Address,
chain_id: &'life2 Id,
gas: u64,
sender: &'life3 str,
msgs: impl 'async_trait + Iterator<Item = M> + Send + Sync,
pay_amount: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
where M: 'async_trait + ToString + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn tx_simulate<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, M>(
&'life0 self,
contract: &'life1 Self::Address,
chain_id: &'life2 Id,
gas: u64,
sender: &'life3 str,
msgs: impl 'async_trait + Iterator<Item = M> + Send + Sync,
pay_amount: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<GasInfo, Self::Error>> + Send + 'async_trait>>
where M: 'async_trait + ToString + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn deploy<M: ToString>(
&self,
chain_id: &Id,
sender: &str,
wasm_path: M,
) -> Result<String, Self::Error>;
fn init<M: ToString>(
&self,
chain_id: &Id,
sender: &str,
admin: Option<&str>,
code_id: u64,
init_msg: M,
label: &str,
) -> Result<String, Self::Error>;
fn trusted_height_hash(&self) -> Result<(u64, String), Self::Error>;
}Required Associated Types§
type Address: AsRef<str>
type Query: ToString
type RawQuery: ToHex
type ChainId: AsRef<str>
type Error
Required Methods§
fn query_smart<'life0, 'life1, 'async_trait, R>(
&'life0 self,
contract: &'life1 Self::Address,
query: Self::Query,
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>>where
R: 'async_trait + DeserializeOwned + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_raw<'life0, 'life1, 'async_trait, R>(
&'life0 self,
contract: &'life1 Self::Address,
query: Self::RawQuery,
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>>where
R: 'async_trait + DeserializeOwned + Default,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_tx<R: DeserializeOwned + Default>( &self, txhash: &str, ) -> Result<R, Self::Error>
fn tx_execute<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, M>( &'life0 self, contract: &'life1 Self::Address, chain_id: &'life2 Id, gas: u64, sender: &'life3 str, msgs: impl 'async_trait + Iterator<Item = M> + Send + Sync, pay_amount: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
fn tx_simulate<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, M>( &'life0 self, contract: &'life1 Self::Address, chain_id: &'life2 Id, gas: u64, sender: &'life3 str, msgs: impl 'async_trait + Iterator<Item = M> + Send + Sync, pay_amount: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<GasInfo, Self::Error>> + Send + 'async_trait>>
fn deploy<M: ToString>( &self, chain_id: &Id, sender: &str, wasm_path: M, ) -> Result<String, Self::Error>
fn init<M: ToString>( &self, chain_id: &Id, sender: &str, admin: Option<&str>, code_id: u64, init_msg: M, label: &str, ) -> Result<String, Self::Error>
fn trusted_height_hash(&self) -> Result<(u64, String), Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.