Skip to content

Commit

Permalink
feat: emit proposal_type in EventTypeSubmitProposal event
Browse files Browse the repository at this point in the history
  • Loading branch information
kienn6034 committed Mar 25, 2024
1 parent 65e6bc4 commit ed8a77a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion x/gov/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Add proposal types to proposals.
* [#18620](https://github.com/cosmos/cosmos-sdk/pull/18620) Add optimistic proposals.
* [#18762](https://github.com/cosmos/cosmos-sdk/pull/18762) Add multiple choice proposals.
* [#19853](https://github.com/cosmos/cosmos-sdk/pull/19853) Emit depositor in `proposal_deposit` event.
* [#19853](https://github.com/cosmos/cosmos-sdk/pull/19853) Emit `depositor` in `EventTypeProposalDeposit` and `proposal_type` in `EventTypeSubmitProposal`

### Improvements

Expand Down
1 change: 1 addition & 0 deletions x/gov/keeper/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata

if err := k.environment.EventService.EventManager(ctx).EmitKV(
types.EventTypeSubmitProposal,
event.NewAttribute(types.AttributeKeyProposalType, proposalType.String()),
event.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)),
event.NewAttribute(types.AttributeKeyProposalProposer, proposer.String()),
event.NewAttribute(types.AttributeKeyProposalMessages, strings.Join(msgs, ",")),
Expand Down

0 comments on commit ed8a77a

Please sign in to comment.