Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imp: add macro for schema support to queries #1187

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading