CwClient

Trait CwClient 

Source
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,
        msg: M,
        pay_amount: &'life4 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
       where M: 'async_trait + ToString + Send,
             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§

Required Methods§

Source

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,

Source

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,

Source

fn query_tx<R: DeserializeOwned + Default>( &self, txhash: &str, ) -> Result<R, Self::Error>

Source

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, msg: M, pay_amount: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
where M: 'async_trait + ToString + Send, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source

fn deploy<M: ToString>( &self, chain_id: &Id, sender: &str, wasm_path: M, ) -> Result<String, Self::Error>

Source

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>

Source

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.

Implementors§