feat(x/gov): emit proposer address in submit proposal event (backport #19842) (#19844)

Co-authored-by: Aryan Tikarya <akaladarshi@gmail.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot] 2024-03-24 21:23:00 +00:00 committed by GitHub
parent 87ad797688
commit a0faab3cb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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),
),
)

View File

@ -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"