pub async fn ibc_query<C, Q>(chain: &C, query: Q) -> Result<Q::Response, error::Error>
where
    C: Chain,
    Q: IbcQuery,
{
    let abci_response = chain
        .rpc_client()
        .abci_query(
            Some(query.path()),
            query.data(),
            Some(query.height().into()),
            query.prove(),
        )
        .await
        .map_err(|e| error::Kind::Rpc.context(e))?;

    if !abci_response.code.is_ok() {
        todo!() // TODO: Fail with response log
    }

    // Data that is not from trusted node or subspace query needs verification
    if is_query_store_with_proof(&query.path()) {
        todo!() // TODO: Verify proof
    }

    query.build_response(abci_response)
}
/// Perform an IBC `query` on the given `chain`, and return the corresponding IBC response.
Perform an IBC `query` on the given `chain`, and return the corresponding IBC response.
Perform an IBC ` query ` on the given ` chain ` and return the corresponding IBC response .
pub async fn ibc_query<C, Q>(chain: &C, query: Q) -> Result<Q::Response, error::Error>
where
    C: Chain,
    Q: IbcQuery,
{
    let abci_response = chain
        .rpc_client()
        .abci_query(
            Some(query.path()),
            query.data(),
            Some(query.height().into()),
            query.prove(),
        )
        .await
        .map_err(|e| error::Kind::Rpc.context(e))?;
    if !abci_response.code.is_ok() {
        todo!() // TODO: Fail with response log
    }
    // Data that is not from trusted node or subspace query needs verification
    if is_query_store_with_proof(&query.path()) {
        todo!() // TODO: Verify proof
    }
    query.build_response(abci_response)
}
pub async fn ibc_query < C , Q > ( chain : & C , query : Q ) -> Result < Q :: Response , error :: Error > where C : Chain , Q : IbcQuery , { let abci_response = chain . rpc_client ( ) . abci_query ( Some ( query . path ( ) ) , query . data ( ) , Some ( query . height ( ) . into ( ) ) , query . prove ( ) , ) . await . map_err ( | e | error :: Kind :: Rpc . context ( e ) ) ? ; if ! abci_response . code . is_ok ( ) { todo ! ( ) // TODO: Fail with response log } // Data that is not from trusted node or subspace query needs verification if is_query_store_with_proof ( & query . path ( ) ) { todo ! ( ) // TODO: Verify proof } query . build_response ( abci_response ) }
Perform an IBC `query` on the given `chain`, and return the corresponding IBC response.
Perform an IBC ` query ` on the given ` chain ` and return the corresponding IBC response .
chain
&C
query
Q
chain
&C
query
Q