Skip to content

Commit bc9921f

Browse files
committed
Adjust IBC Callback types
1 parent 628249f commit bc9921f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

types/ibc.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ type IBCPacketTimeoutMsg struct {
164164
// For `IbcMsg::Transfer`, this is the `memo` field.
165165
// - The receiver of the callback must also be the sender of the message.
166166
type IBCSourceChainCallbackMsg struct {
167-
Acknowledgement *IBCPacketAckMsg `json:"Acknowledgement,omitempty"`
168-
Timeout *IBCPacketTimeoutMsg `json:"Timeout,omitempty"`
167+
Acknowledgement *IBCPacketAckMsg `json:"acknowledgement,omitempty"`
168+
Timeout *IBCPacketTimeoutMsg `json:"timeout,omitempty"`
169169
}
170170

171171
// The message type of the IBC destination chain callback.
@@ -184,8 +184,16 @@ type IBCSourceChainCallbackMsg struct {
184184
// - You have to add json-encoded [`IbcCallbackData`] to a specific field of the message.
185185
// For `IbcMsg::Transfer`, this is the `memo` field.
186186
type IBCDestinationChainCallbackMsg struct {
187-
Ack IBCAcknowledgement `json:"ack"`
188-
Packet IBCPacket `json:"packet"`
187+
Ack IBCFullAcknowledgement `json:"ack"`
188+
Packet IBCPacket `json:"packet"`
189+
}
190+
191+
// The acknowledgement written by the module on the destination chain. It is different from the [`crate::IbcAcknowledgement`] as it can be unsuccessful.
192+
type IBCFullAcknowledgement struct {
193+
// The acknowledgement data returned by the module.
194+
Data []byte `json:"data"`
195+
// Whether the acknowledgement was successful or not.
196+
Success bool `json:"success"`
189197
}
190198

191199
// TODO: test what the sdk Order.String() represents and how to parse back

0 commit comments

Comments
 (0)