diff --git a/types/msg.go b/types/msg.go index 6c55faf9..d7f61684 100644 --- a/types/msg.go +++ b/types/msg.go @@ -355,7 +355,7 @@ type WasmMsg struct { // These are messages in the IBC lifecycle using the new Eureka approach. Only usable by IBC-enabled contracts type EurekaMsg struct { - SendPacket *EurekaSendPacketMsg `json:"execute,omitempty"` + SendPacket *EurekaSendPacketMsg `json:"send_packet,omitempty"` } // Sends an IBC packet with given payloads over the existing channel. diff --git a/types/msg_test.go b/types/msg_test.go index e4a3d723..4a1b409e 100644 --- a/types/msg_test.go +++ b/types/msg_test.go @@ -163,11 +163,18 @@ func TestMsgFundCommunityPoolSerialization(t *testing.T) { } func TestMsgEurekaSendPacketSerialization(t *testing.T) { - document := []byte(`{"send_packet":{"amount":[{"amount":"300","denom":"adenom"},{"amount":"400","denom":"bdenom"}]}}`) + document := []byte(`{"send_packet":{"channel_id":"channel-432", "payloads": [{"destination_port": "wasm.123", "version": "random_version", "encoding": "json", "value": ""}], "timeout": "0"}}`) var msg EurekaMsg err := json.Unmarshal(document, &msg) require.NoError(t, err) - require.Equal(t, Array[Coin]{{"adenom", "300"}, {"bdenom", "400"}}, msg.FundCommunityPool.Amount) + require.Equal(t, "channel-432", msg.SendPacket.ChannelID) + require.Equal(t, []EurekaPayload{{ + DestinationPort: "wasm.123", + Version: "random_version", + Encoding: "json", + Value: []byte(""), + }}, msg.SendPacket.Payloads) + require.Equal(t, uint64(0), msg.SendPacket.Timeout) }