pub fn query_last_price<S: Storage, A: Api, Q: Querier>(
    deps: &Extern<S, A, Q>,
    oracle: &HumanAddr,
    base_asset: String,
    quote_asset: String,
) -> StdResult<Decimal> {
    let res: PriceResponse = deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart {
        contract_addr: HumanAddr::from(oracle),
        msg: to_binary(&OracleQueryMsg::Price {
            base_asset,
            quote_asset,
        })?,
    }))?;

    Ok(res.rate)
}
/// Query asset price igonoring price age
Query asset price igonoring price age
Query asset price igonoring price age
pub fn query_last_price<S: Storage, A: Api, Q: Querier>(
    deps: &Extern<S, A, Q>,
    oracle: &HumanAddr,
    base_asset: String,
    quote_asset: String,
) -> StdResult<Decimal> {
    let res: PriceResponse = deps.querier.query(&QueryRequest::Wasm(WasmQuery::Smart {
        contract_addr: HumanAddr::from(oracle),
        msg: to_binary(&OracleQueryMsg::Price {
            base_asset,
            quote_asset,
        })?,
    }))?;
    Ok(res.rate)
}
pub fn query_last_price < S : Storage , A : Api , Q : Querier > ( deps : & Extern < S , A , Q > , oracle : & HumanAddr , base_asset : String , quote_asset : String , ) -> StdResult < Decimal > { let res : PriceResponse = deps . querier . query ( & QueryRequest :: Wasm ( WasmQuery :: Smart { contract_addr : HumanAddr :: from ( oracle ) , msg : to_binary ( & OracleQueryMsg :: Price { base_asset , quote_asset , } ) ? , } ) ) ? ; Ok ( res . rate ) }
Query asset price igonoring price age
Query asset price igonoring price age
deps
&Extern<S, A, Q>
oracle
&HumanAddr
base_asset
String
quote_asset
String