From ed84bd6f91275210591473e14f11df126fd805e3 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Mon, 8 Aug 2022 16:09:06 -0400 Subject: [PATCH] chore: changelog update (#12859) * updates * updates * updates Co-authored-by: Marko (cherry picked from commit e2d6cbdeb55555893ffde3f2ae0ed6db7179fd0d) # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 7 +++++++ x/auth/ante/fee.go | 7 +++++-- x/auth/tx/service_test.go | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b00aa55157c..cdf44b45dc4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,13 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +<<<<<<< HEAD +======= +* (events) [#12850](https://github.com/cosmos/cosmos-sdk/pull/12850) Add a new `fee_payer` attribute to the `tx` event that is emitted from the `DeductFeeDecorator` AnteHandler decorator. +* (ci) [#12854](https://github.com/cosmos/cosmos-sdk/pull/12854) Use ghcr.io to host the proto builder image. Update proto builder image to go 1.19 +* (x/bank) [#12706](https://github.com/cosmos/cosmos-sdk/pull/12706) Added the `chain-id` flag to the `AddTxFlagsToCmd` API. There is no longer a need to explicitly register this flag on commands whens `AddTxFlagsToCmd` is already called. +* [#12791](https://github.com/cosmos/cosmos-sdk/pull/12791) Bump the math library used in the sdk and replace old usages of sdk.* +>>>>>>> e2d6cbdeb (chore: changelog update (#12859)) * (x/params) [#12615](https://github.com/cosmos/cosmos-sdk/pull/12615) Add `GetParamSetIfExists` function to params `Subspace` to prevent panics on breaking changes. * (x/bank) [#12674](https://github.com/cosmos/cosmos-sdk/pull/12674) Add convenience function `CreatePrefixedAccountStoreKey()` to construct key to access account's balance for a given denom. diff --git a/x/auth/ante/fee.go b/x/auth/ante/fee.go index ea6be8e2c56c..8e7941d8f80e 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -110,8 +110,11 @@ func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee } events := sdk.Events{ - sdk.NewEvent(sdk.EventTypeTx, sdk.NewAttribute(sdk.AttributeKeyFee, fee.String())), - sdk.NewEvent(sdk.EventTypeTx, sdk.NewAttribute(sdk.AttributeKeyFeePayer, deductFeesFrom.String())), + sdk.NewEvent( + sdk.EventTypeTx, + sdk.NewAttribute(sdk.AttributeKeyFee, fee.String()), + sdk.NewAttribute(sdk.AttributeKeyFeePayer, deductFeesFrom.String()), + ), } ctx.EventManager().EmitEvents(events) diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go index 8ed9575388a6..ca1a0186e333 100644 --- a/x/auth/tx/service_test.go +++ b/x/auth/tx/service_test.go @@ -151,7 +151,7 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPC() { // - tx.* events: tx.fee, tx.acc_seq, tx.signature // - Sending Amount to recipient: coin_spent, coin_received, transfer and message.sender= // - Msg events: message.module=bank and message.action=/cosmos.bank.v1beta1.MsgSend - s.Require().Equal(len(res.GetResult().GetEvents()), 14) // 1 coin recv 1 coin spent, 1 transfer, 3 messages. + s.Require().Equal(len(res.GetResult().GetEvents()), 13) // 1 coin recv 1 coin spent, 1 transfer, 3 messages. s.Require().True(res.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, just check it's not empty. } }) @@ -193,7 +193,7 @@ func (s IntegrationTestSuite) TestSimulateTx_GRPCGateway() { s.Require().NoError(err) // Check the result and gas used are correct. s.Require().Len(result.GetResult().MsgResponses, 1) - s.Require().Equal(len(result.GetResult().GetEvents()), 14) // See TestSimulateTx_GRPC for the 13 events. + s.Require().Equal(len(result.GetResult().GetEvents()), 13) // See TestSimulateTx_GRPC for the 13 events. s.Require().True(result.GetGasInfo().GetGasUsed() > 0) // Gas used sometimes change, jus } })