Skip to content

Commit

Permalink
imp: add macro for schema support to queries (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez authored Apr 24, 2024
1 parent 41348af commit 68f8c48
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ibc-clients/cw-context/src/types/msgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
}

Expand Down

0 comments on commit 68f8c48

Please sign in to comment.