Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading