Trait AsyncDexQueryMsgFns

Source
pub trait AsyncDexQueryMsgFns<Chain: AsyncWasmQuerier + ChainState, CwOrchQueryMsgType: Sync>: AsyncCwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>
where DexQueryMsg: Into<CwOrchQueryMsgType>,
{ // Provided methods async fn simulate_swap_async( &self, ask_asset: AssetEntry, dex: DexName, offer_asset: AnsAsset, ) -> Result<SimulateSwapResponse, CwEnvError> { ... } async fn simulate_swap_raw_async( &self, ask_asset: AssetInfoBase<String>, dex: DexName, offer_asset: AssetBase<String>, pool: UncheckedPoolAddress, ) -> Result<SimulateSwapResponse<AssetInfoBase<String>>, CwEnvError> { ... } async fn generate_messages_async( &self, addr_as_sender: impl Into<String>, message: DexExecuteMsg, ) -> Result<GenerateMessagesResponse, CwEnvError> { ... } async fn fees_async(&self) -> Result<DexFeesResponse, CwEnvError> { ... } }
Expand description

Automatically derived trait that allows you to call the variants of the message directly without the need to construct the struct yourself.

Provided Methods§

Source

async fn simulate_swap_async( &self, ask_asset: AssetEntry, dex: DexName, offer_asset: AnsAsset, ) -> Result<SimulateSwapResponse, CwEnvError>

Automatically generated wrapper around DexQueryMsg::SimulateSwap variant

Source

async fn simulate_swap_raw_async( &self, ask_asset: AssetInfoBase<String>, dex: DexName, offer_asset: AssetBase<String>, pool: UncheckedPoolAddress, ) -> Result<SimulateSwapResponse<AssetInfoBase<String>>, CwEnvError>

Automatically generated wrapper around DexQueryMsg::SimulateSwapRaw variant

Source

async fn generate_messages_async( &self, addr_as_sender: impl Into<String>, message: DexExecuteMsg, ) -> Result<GenerateMessagesResponse, CwEnvError>

Automatically generated wrapper around DexQueryMsg::GenerateMessages variant

Source

async fn fees_async(&self) -> Result<DexFeesResponse, CwEnvError>

Automatically generated wrapper around DexQueryMsg::Fees variant

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§

Source§

impl<Chain: AsyncWasmQuerier + ChainState, CwOrchQueryMsgType: Sync, SupportedContract> AsyncDexQueryMsgFns<Chain, CwOrchQueryMsgType> for SupportedContract
where DexQueryMsg: Into<CwOrchQueryMsgType>, SupportedContract: AsyncCwOrchQuery<Chain, QueryMsg = CwOrchQueryMsgType>,