Skip to content

Commit

Permalink
feat: Add sender to fungible_token_packet events (backport #1414) (#1426
Browse files Browse the repository at this point in the history
)

* Add Sender to funginble_token_packet events

(cherry picked from commit f05a7cf)

* chore: Updated CHANGELOG.md

(cherry picked from commit c809c51)

# Conflicts:
#	CHANGELOG.md

* Update CHANGELOG.md

(cherry picked from commit d8be3d0)

# Conflicts:
#	CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
(cherry picked from commit 46d73a0)

# Conflicts:
#	CHANGELOG.md

* fix conflicts

Co-authored-by: chatton <cianhatton@gmail.com>
Co-authored-by: Cian Hatton <cian@interchain.io>
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
  • Loading branch information
4 people committed May 24, 2022
1 parent 8111f7a commit 41a0733
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions modules/apps/transfer/ibc_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 41a0733

Please sign in to comment.