pub use cli::CliClient; use cosmrs::tendermint::chain::Id; pub use grpc::GrpcClient; use hex::ToHex; use serde::de::DeserializeOwned; pub mod cli; pub mod grpc; #[async_trait::async_trait] pub trait CwClient { type Address: AsRef; type Query: ToString; type RawQuery: ToHex; type ChainId: AsRef; type Error; async fn query_smart( &self, contract: &Self::Address, query: Self::Query, ) -> Result; fn query_raw( &self, contract: &Self::Address, query: Self::RawQuery, ) -> Result; fn query_tx(&self, txhash: &str) -> Result; async fn tx_execute( &self, contract: &Self::Address, chain_id: &Id, gas: u64, sender: &str, msg: M, fees: &str, ) -> Result; fn deploy( &self, chain_id: &Id, sender: &str, // what should this type be wasm_path: M, ) -> Result; fn init( &self, chain_id: &Id, sender: &str, code_id: u64, init_msg: M, label: &str, ) -> Result; fn trusted_height_hash(&self) -> Result<(u64, String), Self::Error>; }