From 41a07331986d9bc7707782d9539e9ae7d24fb300 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 20:36:11 +0200 Subject: [PATCH] feat: Add sender to fungible_token_packet events (backport #1414) (#1426) * Add Sender to funginble_token_packet events (cherry picked from commit f05a7cf8840ead622e7b5628466e1f9a311a717d) * chore: Updated CHANGELOG.md (cherry picked from commit c809c518423de21c576b8a80fec7fb5f5e07fca8) # Conflicts: # CHANGELOG.md * Update CHANGELOG.md (cherry picked from commit d8be3d0ce674c004d7543413cbeba3455d7028e2) # Conflicts: # CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Damian Nolan (cherry picked from commit 46d73a09352d7db7b01d006f64627d519919f44e) # Conflicts: # CHANGELOG.md * fix conflicts Co-authored-by: chatton Co-authored-by: Cian Hatton Co-authored-by: Carlos Rodriguez --- CHANGELOG.md | 1 + modules/apps/transfer/ibc_module.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6880b9f6e4..c9fa888d6be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. * (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. ### Features diff --git a/modules/apps/transfer/ibc_module.go b/modules/apps/transfer/ibc_module.go index f5ed807d8b2..f611c62642f 100644 --- a/modules/apps/transfer/ibc_module.go +++ b/modules/apps/transfer/ibc_module.go @@ -190,6 +190,7 @@ func (im IBCModule) OnRecvPacket( sdk.NewEvent( types.EventTypePacket, sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + sdk.NewAttribute(sdk.AttributeKeySender, data.Sender), sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver), sdk.NewAttribute(types.AttributeKeyDenom, data.Denom), sdk.NewAttribute(types.AttributeKeyAmount, data.Amount), @@ -225,6 +226,7 @@ func (im IBCModule) OnAcknowledgementPacket( sdk.NewEvent( types.EventTypePacket, sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + sdk.NewAttribute(sdk.AttributeKeySender, data.Sender), sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver), sdk.NewAttribute(types.AttributeKeyDenom, data.Denom), sdk.NewAttribute(types.AttributeKeyAmount, data.Amount),