Skip to content

Commit

Permalink
feat(x/gov): emit proposer address in submit proposal event (#19842)
Browse files Browse the repository at this point in the history
  • Loading branch information
akaladarshi committed Mar 24, 2024
1 parent ac61b69 commit 4599439
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions x/gov/keeper/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,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.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)),
event.NewAttribute(types.AttributeKeyProposalProposer, proposer.String()),
event.NewAttribute(types.AttributeKeyProposalMessages, strings.Join(msgs, ",")),
); err != nil {
return v1.Proposal{}, fmt.Errorf("failed to emit event: %w", err)
Expand Down
1 change: 1 addition & 0 deletions x/gov/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const (
AttributeKeyVotingPeriodStart = "voting_period_start"
AttributeKeyProposalLog = "proposal_log" // log of proposal execution
AttributeKeyProposalDepositError = "proposal_deposit_error" // error on proposal deposit refund/burn
AttributeKeyProposalProposer = "proposal_proposer" // account address of the proposer

AttributeValueProposalDropped = "proposal_dropped" // didn't meet min deposit
AttributeValueProposalPassed = "proposal_passed" // met vote quorum
Expand Down

0 comments on commit 4599439

Please sign in to comment.