Skip to content

Commit 1e0f0bf

Browse files
author
Tomasz Kulik
authored
feat: Add WriteAcknowledgement in Ibc2Msg (#630)
1 parent 07d01ec commit 1e0f0bf

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

types/ibc2.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ type IBC2Payload struct {
1818
}
1919

2020
type IBC2PacketReceiveMsg struct {
21-
Payload IBC2Payload `json:"payload"`
22-
Relayer string `json:"relayer"`
23-
SourceClient string `json:"source_client"`
21+
Payload IBC2Payload `json:"payload"`
22+
Relayer string `json:"relayer"`
23+
SourceClient string `json:"source_client"`
24+
PacketSequence uint64 `json:"packet_sequence"`
2425
}

types/msg.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ type WasmMsg struct {
355355

356356
// These are messages in the IBC lifecycle using the new IBC2 approach. Only usable by IBC2-enabled contracts
357357
type IBC2Msg struct {
358-
SendPacket *IBC2SendPacketMsg `json:"send_packet,omitempty"`
358+
SendPacket *IBC2SendPacketMsg `json:"send_packet,omitempty"`
359+
WriteAcknowledgement *IBC2WriteAcknowledgementMsg `json:"write_acknowledgement,omitempty"`
359360
}
360361

361362
// Sends an IBC packet with given payloads over the existing channel.
@@ -365,6 +366,15 @@ type IBC2SendPacketMsg struct {
365366
Timeout uint64 `json:"timeout,string,omitempty"`
366367
}
367368

369+
type IBC2WriteAcknowledgementMsg struct {
370+
// The acknowledgement to send back
371+
Ack IBCAcknowledgement `json:"ack"`
372+
// Existing channel where the packet was received
373+
ChannelID string `json:"channel_id"`
374+
// Sequence number of the packet that was received
375+
PacketSequence uint64 `json:"packet_sequence"`
376+
}
377+
368378
// ExecuteMsg is used to call another defined contract on this chain.
369379
// The calling contract requires the callee to be defined beforehand,
370380
// and the address should have been defined in initialization.

0 commit comments

Comments
 (0)