Skip to content

Commit

Permalink
Update go-gen test
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Apr 26, 2024
1 parent 752f125 commit 9280da8
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions packages/go-gen/tests/cosmwasm_std__IbcMsg.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,23 @@ type SendPacketMsg struct {
Data []byte `json:"data"`
Timeout IBCTimeout `json:"timeout"`
}
type WriteAcknowledgementMsg struct {
// The acknowledgement to send back
Ack IBCFullAcknowledgement `json:"ack"`
// Existing channel where the packet was received
ChannelID string `json:"channel_id"`
// Sequence number of the packet that was received
PacketSequence uint64 `json:"packet_sequence"`
}
type CloseChannelMsg struct {
ChannelID string `json:"channel_id"`
}

type IBCMsg struct {
Transfer *TransferMsg `json:"transfer,omitempty"`
SendPacket *SendPacketMsg `json:"send_packet,omitempty"`
CloseChannel *CloseChannelMsg `json:"close_channel,omitempty"`
Transfer *TransferMsg `json:"transfer,omitempty"`
SendPacket *SendPacketMsg `json:"send_packet,omitempty"`
WriteAcknowledgement *WriteAcknowledgementMsg `json:"write_acknowledgement,omitempty"`
CloseChannel *CloseChannelMsg `json:"close_channel,omitempty"`
}

// Coin is a string representation of the sdk.Coin type (more portable than sdk.Int)
Expand All @@ -26,6 +35,14 @@ type Coin struct {
Denom string `json:"denom"` // type, eg. "ATOM"
}

// The acknowledgement written by the module on the destination chain. It is different from the [`crate::IbcAcknowledgement`] as it can be unsuccessful.
type IBCFullAcknowledgement struct {
// The acknowledgement data returned by the module.
Data []byte `json:"data"`
// Whether the acknowledgement was successful or not.
Success bool `json:"success"`
}

// IBCTimeout is the timeout for an IBC packet. At least one of block and timestamp is required.
type IBCTimeout struct {
Block *IBCTimeoutBlock `json:"block,omitempty"` // in wasmvm, this does not have "omitempty"
Expand Down

0 comments on commit 9280da8

Please sign in to comment.