From a0faab3cb9ffe1d47b74843d176a4963ccb32104 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 24 Mar 2024 21:23:00 +0000 Subject: [PATCH] feat(x/gov): emit proposer address in submit proposal event (backport #19842) (#19844) Co-authored-by: Aryan Tikarya Co-authored-by: marbar3778 Co-authored-by: Julien Robert --- CHANGELOG.md | 12 ++++++++---- x/gov/keeper/proposal.go | 1 + x/gov/types/events.go | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec5b80873dff..30a4bc971530 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,14 +38,18 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -## Bug Fixes - -* (crypto) [#19691](https://github.com/cosmos/cosmos-sdk/pull/19745) Fix tx sign doesn't throw an error when incorrect Ledger is used. - ### Features * (types) [#19759](https://github.com/cosmos/cosmos-sdk/pull/19759) Align SignerExtractionAdapter in PriorityNonceMempool Remove. +### Improvements + +* (x/gov) [#19844](https://github.com/cosmos/cosmos-sdk/pull/19844) Emit the proposer of governance proposals. + +## Bug Fixes + +* (crypto) [#19691](https://github.com/cosmos/cosmos-sdk/pull/19745) Fix tx sign doesn't throw an error when incorrect Ledger is used. + ## [v0.50.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.5) - 2024-03-12 ### Features diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index 20eb6763d069..a461c369ea05 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -123,6 +123,7 @@ func (keeper Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, met sdk.NewEvent( types.EventTypeSubmitProposal, sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), + sdk.NewAttribute(types.AttributeKeyProposalProposer, proposer.String()), sdk.NewAttribute(types.AttributeKeyProposalMessages, msgsStr), ), ) diff --git a/x/gov/types/events.go b/x/gov/types/events.go index 96ccc5577e33..e91d9d7f4a89 100644 --- a/x/gov/types/events.go +++ b/x/gov/types/events.go @@ -22,6 +22,7 @@ const ( AttributeValueExpeditedProposalRejected = "expedited_proposal_rejected" // didn't meet expedited vote quorum AttributeValueProposalFailed = "proposal_failed" // error on proposal handler AttributeValueProposalCanceled = "proposal_canceled" // error on proposal handler + AttributeKeyProposalProposer = "proposal_proposer" // account address of the proposer AttributeKeyProposalType = "proposal_type" AttributeSignalTitle = "signal_title"