Skip to content

Commit

Permalink
rename v2 event attribute key for encoded data (#7635)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjermundgaraba authored Dec 9, 2024
1 parent cf82eba commit 945b018
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions modules/core/04-channel/v2/keeper/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions modules/core/04-channel/v2/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 945b018

Please sign in to comment.