From 6237f5923b0562f63a411c0cf07d64fca4096d13 Mon Sep 17 00:00:00 2001 From: Gjermund Garaba Date: Sat, 7 Dec 2024 21:48:44 +0100 Subject: [PATCH] rename v2 event attribute key for encoded data --- modules/core/04-channel/v2/keeper/events.go | 12 ++++++------ modules/core/04-channel/v2/types/events.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/core/04-channel/v2/keeper/events.go b/modules/core/04-channel/v2/keeper/events.go index 5245b54901b..eb1a71b5481 100644 --- a/modules/core/04-channel/v2/keeper/events.go +++ b/modules/core/04-channel/v2/keeper/events.go @@ -28,7 +28,7 @@ func emitSendPacketEvents(ctx context.Context, packet types.Packet) { sdk.NewAttribute(types.AttributeKeyDstChannel, packet.DestinationChannel), sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.TimeoutTimestamp)), - sdk.NewAttribute(types.AttributeKeyPacketDataHex, hex.EncodeToString(encodedPacket)), + sdk.NewAttribute(types.AttributeKeyEncodedPacketHex, hex.EncodeToString(encodedPacket)), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -53,7 +53,7 @@ func emitRecvPacketEvents(ctx context.Context, packet types.Packet) { sdk.NewAttribute(types.AttributeKeyDstChannel, packet.DestinationChannel), sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.TimeoutTimestamp)), - sdk.NewAttribute(types.AttributeKeyPacketDataHex, hex.EncodeToString(encodedPacket)), + sdk.NewAttribute(types.AttributeKeyEncodedPacketHex, hex.EncodeToString(encodedPacket)), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -83,8 +83,8 @@ func emitWriteAcknowledgementEvents(ctx context.Context, packet types.Packet, ac sdk.NewAttribute(types.AttributeKeyDstChannel, packet.DestinationChannel), sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.TimeoutTimestamp)), - sdk.NewAttribute(types.AttributeKeyPacketDataHex, hex.EncodeToString(encodedPacket)), - sdk.NewAttribute(types.AttributeKeyAckDataHex, hex.EncodeToString(encodedAck)), + sdk.NewAttribute(types.AttributeKeyEncodedPacketHex, hex.EncodeToString(encodedPacket)), + sdk.NewAttribute(types.AttributeKeyEncodedAckHex, hex.EncodeToString(encodedAck)), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -109,7 +109,7 @@ func emitAcknowledgePacketEvents(ctx context.Context, packet types.Packet) { sdk.NewAttribute(types.AttributeKeyDstChannel, packet.DestinationChannel), sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.TimeoutTimestamp)), - sdk.NewAttribute(types.AttributeKeyPacketDataHex, hex.EncodeToString(encodedPacket)), + sdk.NewAttribute(types.AttributeKeyEncodedPacketHex, hex.EncodeToString(encodedPacket)), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -134,7 +134,7 @@ func emitTimeoutPacketEvents(ctx context.Context, packet types.Packet) { sdk.NewAttribute(types.AttributeKeyDstChannel, packet.DestinationChannel), sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.TimeoutTimestamp)), - sdk.NewAttribute(types.AttributeKeyPacketDataHex, hex.EncodeToString(encodedPacket)), + sdk.NewAttribute(types.AttributeKeyEncodedPacketHex, hex.EncodeToString(encodedPacket)), ), sdk.NewEvent( sdk.EventTypeMessage, diff --git a/modules/core/04-channel/v2/types/events.go b/modules/core/04-channel/v2/types/events.go index 46ba862ac68..1ef33d80491 100644 --- a/modules/core/04-channel/v2/types/events.go +++ b/modules/core/04-channel/v2/types/events.go @@ -23,8 +23,8 @@ const ( AttributeKeyDstChannel = "packet_dest_channel" AttributeKeySequence = "packet_sequence" AttributeKeyTimeoutTimestamp = "packet_timeout_timestamp" - AttributeKeyPacketDataHex = "packet_data_hex" - AttributeKeyAckDataHex = "acknowledgement_data_hex" + AttributeKeyEncodedPacketHex = "encoded_packet_hex" + AttributeKeyEncodedAckHex = "encoded_acknowledgement_hex" ) // IBC channel events vars