pub async fn estimate_fee(
        &self,
        sender: &str,
        msgs: &[Message],
        gas_adjustment: f64,
        gas_prices: &[&Coin],
    ) -> anyhow::Result<LCDResult<TxFeeResult>> {
        let tx_est = TxEstimate::create(
            self.terra.chain_id,
            sender,
            msgs,
            gas_adjustment,
            gas_prices,
        );

        if self.terra.debug {
            log::info!("Estimate Transaction = {}", serde_json::to_string(&tx_est)?);
        } else {
            log::debug!(
                "Estimate Transaction = {:#?} #messages={}",
                tx_est.base_req,
                tx_est.msgs.len()
            )
        }
        let resp = self
            .terra
            .post_cmd::<TxEstimate, LCDResult<TxFeeResult>>("/txs/estimate_fee", &tx_est)
            .await?;
        Ok(resp)
    }
/// Estimate the StdFee structure based on the gas used
Estimate the StdFee structure based on the gas used
Estimate the StdFee structure based on the gas used
pub async fn estimate_fee(
        &self,
        sender: &str,
        msgs: &[Message],
        gas_adjustment: f64,
        gas_prices: &[&Coin],
    ) -> anyhow::Result<LCDResult<TxFeeResult>> {
        let tx_est = TxEstimate::create(
            self.terra.chain_id,
            sender,
            msgs,
            gas_adjustment,
            gas_prices,
        );
        if self.terra.debug {
            log::info!("Estimate Transaction = {}", serde_json::to_string(&tx_est)?);
        } else {
            log::debug!(
                "Estimate Transaction = {:#?} #messages={}",
                tx_est.base_req,
                tx_est.msgs.len()
            )
        }
        let resp = self
            .terra
            .post_cmd::<TxEstimate, LCDResult<TxFeeResult>>("/txs/estimate_fee", &tx_est)
            .await?;
        Ok(resp)
    }
pub async fn estimate_fee ( & self , sender : & str , msgs : & [ Message ] , gas_adjustment : f64 , gas_prices : & [ & Coin ] , ) -> anyhow :: Result < LCDResult < TxFeeResult > > { let tx_est = TxEstimate :: create ( self . terra . chain_id , sender , msgs , gas_adjustment , gas_prices , ) ; if self . terra . debug { log :: info ! ( " " serde_json to_string ( tx_est ) ) ; } else { log :: debug ! ( " " tx_est base_req tx_est msgs len ( ) ) } let resp = self . terra . post_cmd :: < TxEstimate , LCDResult < TxFeeResult > > ( " " , & tx_est ) . await ? ; Ok ( resp ) }
Estimate the StdFee structure based on the gas used
Estimate the StdFee structure based on the gas used
&self
sender
&str
msgs
&[Message]
gas_adjustment
f64
gas_prices
&[&Coin]