Skip to content

Commit 0ec66a1

Browse files
committed
feat: emit proposer address in submit proposal event
1 parent ac61b69 commit 0ec66a1

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

x/gov/keeper/proposal.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata
147147
if err := k.environment.EventService.EventManager(ctx).EmitKV(
148148
types.EventTypeSubmitProposal,
149149
event.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)),
150+
event.NewAttribute(types.AttributeKeyProposalProposer, proposer.String()),
150151
event.NewAttribute(types.AttributeKeyProposalMessages, strings.Join(msgs, ",")),
151152
); err != nil {
152153
return v1.Proposal{}, fmt.Errorf("failed to emit event: %w", err)

x/gov/types/events.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const (
1717
AttributeKeyVotingPeriodStart = "voting_period_start"
1818
AttributeKeyProposalLog = "proposal_log" // log of proposal execution
1919
AttributeKeyProposalDepositError = "proposal_deposit_error" // error on proposal deposit refund/burn
20+
AttributeKeyProposalProposer = "proposal_proposer" // account address of the proposer
2021

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

0 commit comments

Comments
 (0)