Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(x/bank): add origin address in event multisend (backport #21460) #21465

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (cli) [#20779](https://github.com/cosmos/cosmos-sdk/pull/20779) Added `module-hash-by-height` command to query and retrieve module hashes at a specified blockchain height, enhancing debugging capabilities.

### Improvements

* (x/bank) [#21460](https://github.com/cosmos/cosmos-sdk/pull/21460) Added `Sender` attribute in `MsgMultiSend` event.

### Bug Fixes

* (baseapp) [#21256](https://github.com/cosmos/cosmos-sdk/pull/21256) Halt height will not commit the block indicated, meaning that if halt-height is set to 10, only blocks until 9 (included) will be committed. This is to go back to the original behavior before a change was introduced in v0.50.0.
Expand Down
9 changes: 3 additions & 6 deletions x/bank/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1454,20 +1454,17 @@ func (suite *KeeperTestSuite) TestMsgMultiSendEvents() {
event2.Attributes = append(
event2.Attributes,
abci.EventAttribute{Key: banktypes.AttributeKeyRecipient, Value: accAddrs[2].String()},
abci.EventAttribute{Key: banktypes.AttributeKeySender, Value: accAddrs[0].String()},
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()},
)
event2.Attributes = append(
event2.Attributes,
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins.String()})
event3 := sdk.Event{
Type: banktypes.EventTypeTransfer,
Attributes: []abci.EventAttribute{},
}
event3.Attributes = append(
event3.Attributes,
abci.EventAttribute{Key: banktypes.AttributeKeyRecipient, Value: accAddrs[3].String()},
)
event3.Attributes = append(
event3.Attributes,
abci.EventAttribute{Key: banktypes.AttributeKeySender, Value: accAddrs[0].String()},
abci.EventAttribute{Key: sdk.AttributeKeyAmount, Value: newCoins2.String()},
)
// events are shifted due to the funding account events
Expand Down
1 change: 1 addition & 0 deletions x/bank/keeper/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func (k BaseSendKeeper) InputOutputCoins(ctx context.Context, input types.Input,
sdk.NewEvent(
types.EventTypeTransfer,
sdk.NewAttribute(types.AttributeKeyRecipient, outAddress.String()),
sdk.NewAttribute(types.AttributeKeySender, input.Address),
sdk.NewAttribute(sdk.AttributeKeyAmount, out.Coins.String()),
),
)
Expand Down
Loading