cosmwasm_std/query/
ibc.rs1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use crate::ibc::IbcChannel;
5use crate::prelude::*;
6
7#[non_exhaustive]
11#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
12#[serde(rename_all = "snake_case")]
13pub enum IbcQuery {
14 PortId {},
18 #[deprecated = "Returns a potentially unbound number of results. If you think you have a valid usecase, please open an issue."]
23 ListChannels { port_id: Option<String> },
24 Channel {
30 channel_id: String,
31 port_id: Option<String>,
32 },
33 #[cfg(feature = "cosmwasm_2_2")]
39 #[deprecated(
40 since = "2.2.3",
41 note = "IBC fees have been removed from ibc-go `v10`, which is used in wasmd `v0.55.0`."
42 )]
43 FeeEnabledChannel {
44 port_id: Option<String>,
45 channel_id: String,
46 },
47}
48
49#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
50#[non_exhaustive]
51pub struct PortIdResponse {
52 pub port_id: String,
53}
54
55impl_response_constructor!(PortIdResponse, port_id: String);
56
57#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
58#[non_exhaustive]
59pub struct ListChannelsResponse {
60 pub channels: Vec<IbcChannel>,
61}
62
63impl_response_constructor!(ListChannelsResponse, channels: Vec<IbcChannel>);
64
65#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
66#[non_exhaustive]
67pub struct ChannelResponse {
68 pub channel: Option<IbcChannel>,
69}
70
71impl_response_constructor!(ChannelResponse, channel: Option<IbcChannel>);
72
73#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
74#[non_exhaustive]
75#[deprecated(
76 since = "2.2.3",
77 note = "IBC fees have been removed from ibc-go `v10`, which is used in wasmd `v0.55.0`."
78)]
79pub struct FeeEnabledChannelResponse {
80 pub fee_enabled: bool,
81}
82
83impl_response_constructor!(FeeEnabledChannelResponse, fee_enabled: bool);