From 095559f5c40d4f94c72eb63dde81ec2e8b89d870 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Mon, 22 Apr 2024 20:17:17 +0200 Subject: [PATCH] imp: add macro for schema support to queries --- ibc-clients/cw-context/src/types/msgs.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ibc-clients/cw-context/src/types/msgs.rs b/ibc-clients/cw-context/src/types/msgs.rs index 58ca50470..506d65695 100644 --- a/ibc-clients/cw-context/src/types/msgs.rs +++ b/ibc-clients/cw-context/src/types/msgs.rs @@ -2,7 +2,7 @@ //! light client. use std::str::FromStr; -use cosmwasm_schema::cw_serde; +use cosmwasm_schema::{cw_serde, QueryResponses}; use ibc_client_wasm_types::serializer::Base64; use ibc_client_wasm_types::Bytes; use ibc_core::client::types::proto::v1::Height as RawHeight; @@ -231,13 +231,18 @@ pub struct MigrateClientStoreMsg {} // Implementation of the QueryMsg enum and its variants // ------------------------------------------------------------ -#[derive(derive_more::From)] +#[derive(QueryResponses, derive_more::From)] #[cw_serde] pub enum QueryMsg { + #[returns(crate::types::response::QueryResponse)] Status(StatusMsg), + #[returns(crate::types::response::QueryResponse)] ExportMetadata(ExportMetadataMsg), + #[returns(crate::types::response::QueryResponse)] TimestampAtHeight(TimestampAtHeightMsg), + #[returns(crate::types::response::QueryResponse)] VerifyClientMessage(VerifyClientMessageRaw), + #[returns(crate::types::response::QueryResponse)] CheckForMisbehaviour(CheckForMisbehaviourMsgRaw), }