Skip to content

Commit

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

* Add Sender to funginble_token_packet events

(cherry picked from commit f05a7cf)

# Conflicts:
#	modules/apps/transfer/ibc_module.go

* 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 <[email protected]>
(cherry picked from commit 46d73a0)

# Conflicts:
#	CHANGELOG.md

* fix conflicts

* Update CHANGELOG.md

Co-authored-by: chatton <[email protected]>
Co-authored-by: Cian Hatton <[email protected]>
Co-authored-by: crodriguezvega <[email protected]>
  • Loading branch information
4 people authored May 24, 2022
1 parent bb2ef4d commit a90b700
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 @@ -46,6 +46,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/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ func (am AppModule) 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, fmt.Sprintf("%d", data.Amount)),
Expand Down Expand Up @@ -380,6 +381,7 @@ func (am AppModule) 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, fmt.Sprintf("%d", data.Amount)),
Expand Down

0 comments on commit a90b700

Please sign in to comment.