Skip to content

Commit 59deef9

Browse files
committed
Add missing derives
1 parent 1259017 commit 59deef9

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

packages/std/src/ibc/callbacks.rs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ use crate::{Addr, IbcAcknowledgement, IbcPacket, Uint64};
5757
/// })).unwrap()),
5858
/// };
5959
/// ```
60-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
60+
#[derive(
61+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, cw_schema::Schemaifier,
62+
)]
6163
pub struct IbcCallbackRequest {
6264
// using private fields to force use of the constructors
6365
#[serde(skip_serializing_if = "Option::is_none")]
@@ -92,7 +94,9 @@ impl IbcCallbackRequest {
9294
}
9395
}
9496

95-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
97+
#[derive(
98+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, cw_schema::Schemaifier,
99+
)]
96100
pub struct IbcSrcCallback {
97101
/// The source chain address that should receive the callback.
98102
/// For CosmWasm contracts, this *must* be `env.contract.address`.
@@ -103,7 +107,9 @@ pub struct IbcSrcCallback {
103107
pub gas_limit: Option<Uint64>,
104108
}
105109

106-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
110+
#[derive(
111+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, cw_schema::Schemaifier,
112+
)]
107113
pub struct IbcDstCallback {
108114
/// The destination chain address that should receive the callback.
109115
pub address: String,
@@ -126,14 +132,18 @@ pub struct IbcDstCallback {
126132
/// - You have to add serialized [`IbcCallbackRequest`] to a specific field of the message.
127133
/// For `IbcMsg::Transfer`, this is the `memo` field and it needs to be json-encoded.
128134
/// - The receiver of the callback must also be the sender of the message.
129-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
135+
#[derive(
136+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, cw_schema::Schemaifier,
137+
)]
130138
#[serde(rename_all = "snake_case")]
131139
pub enum IbcSourceCallbackMsg {
132140
Acknowledgement(IbcAckCallbackMsg),
133141
Timeout(IbcTimeoutCallbackMsg),
134142
}
135143

136-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
144+
#[derive(
145+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, cw_schema::Schemaifier,
146+
)]
137147
#[non_exhaustive]
138148
pub struct IbcAckCallbackMsg {
139149
pub acknowledgement: IbcAcknowledgement,
@@ -155,7 +165,9 @@ impl IbcAckCallbackMsg {
155165
}
156166
}
157167

158-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
168+
#[derive(
169+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, cw_schema::Schemaifier,
170+
)]
159171
#[non_exhaustive]
160172
pub struct IbcTimeoutCallbackMsg {
161173
pub packet: IbcPacket,
@@ -187,7 +199,9 @@ impl IbcTimeoutCallbackMsg {
187199
/// - The IBC application in the destination chain must have support for the callbacks middleware.
188200
/// - You have to add serialized [`IbcCallbackRequest`] to a specific field of the message.
189201
/// For `IbcMsg::Transfer`, this is the `memo` field and it needs to be json-encoded.
190-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
202+
#[derive(
203+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, cw_schema::Schemaifier,
204+
)]
191205
pub struct IbcDestinationCallbackMsg {
192206
pub packet: IbcPacket,
193207
pub ack: IbcAcknowledgement,

packages/std/src/query/ibc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ pub struct ChannelResponse {
7373

7474
impl_response_constructor!(ChannelResponse, channel: Option<IbcChannel>);
7575

76-
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
76+
#[derive(
77+
Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, cw_schema::Schemaifier,
78+
)]
7779
#[non_exhaustive]
7880
pub struct FeeEnabledChannelResponse {
7981
pub fee_enabled: bool,

packages/std/src/query/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub struct GrpcQuery {
108108
/// # use cosmwasm_std::CustomQuery;
109109
/// # use schemars::JsonSchema;
110110
/// # use serde::{Deserialize, Serialize};
111-
/// #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
111+
/// #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema, cw_schema::Schemaifier)]
112112
/// #[serde(rename_all = "snake_case")]
113113
/// pub enum MyCustomQuery {
114114
/// Ping {},

0 commit comments

Comments
 (0)