pub fn create_pair(
        &mut self,
        asset_infos: [AssetInfo; 2],
        commission: impl Into<Option<Decimal>>,
    ) -> Result<(Addr, Cw20Contract)> {
        self.app
            .execute_contract(
                self.owner.clone(),
                self.factory.clone(),
                &ExecuteMsg::CreatePair {
                    asset_infos: asset_infos.clone(),
                    commission: commission.into(),
                },
                &[],
            )
            .map_err(|err| anyhow!(err))?;

        let res: PairInfo = self
            .app
            .wrap()
            .query_wasm_smart(self.factory.clone(), &QueryMsg::Pair { asset_infos })?;

        Ok((res.contract_addr, Cw20Contract(res.liquidity_token)))
    }
/// Executes CreatePair on `factory`. Returns created pair address and its liquidity token
/// address.
Executes CreatePair on `factory`. Returns created pair address and its liquidity token
address.
Executes CreatePair on ` factory ` . Returns created pair address and its liquidity token address .
pub fn create_pair(
        &mut self,
        asset_infos: [AssetInfo; 2],
        commission: impl Into<Option<Decimal>>,
    ) -> Result<(Addr, Cw20Contract)> {
        self.app
            .execute_contract(
                self.owner.clone(),
                self.factory.clone(),
                &ExecuteMsg::CreatePair {
                    asset_infos: asset_infos.clone(),
                    commission: commission.into(),
                },
                &[],
            )
            .map_err(|err| anyhow!(err))?;
        let res: PairInfo = self
            .app
            .wrap()
            .query_wasm_smart(self.factory.clone(), &QueryMsg::Pair { asset_infos })?;
        Ok((res.contract_addr, Cw20Contract(res.liquidity_token)))
    }
pub fn create_pair ( & mut self , asset_infos : [ AssetInfo ; 2 ] , commission : impl Into < Option < Decimal > > , ) -> Result < ( Addr , Cw20Contract ) > { self . app . execute_contract ( self . owner . clone ( ) , self . factory . clone ( ) , & ExecuteMsg :: CreatePair { asset_infos : asset_infos . clone ( ) , commission : commission . into ( ) , } , & [ ] , ) . map_err ( | err | anyhow ! ( err ) ) ? ; let res : PairInfo = self . app . wrap ( ) . query_wasm_smart ( self . factory . clone ( ) , & QueryMsg :: Pair { asset_infos } ) ? ; Ok ( ( res . contract_addr , Cw20Contract ( res . liquidity_token ) ) ) }
Executes CreatePair on `factory`.
Executes CreatePair on ` factory ` .
&mut self
asset_infos
[AssetInfo; 2]
commission
impl Into<Option<Decimal>>
&mut self
asset_infos
[AssetInfo; 2]
commission
impl Into<Option<Decimal>>