diff --git a/x/gov/keeper/vote.go b/x/gov/keeper/vote.go index 6f19007c043d..0bc99653d509 100644 --- a/x/gov/keeper/vote.go +++ b/x/gov/keeper/vote.go @@ -48,6 +48,7 @@ func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr s sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeProposalVote, + sdk.NewAttribute(types.AttributeKeyVoter, voterAddr.String()), sdk.NewAttribute(types.AttributeKeyOption, options.String()), sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), ), diff --git a/x/gov/types/events.go b/x/gov/types/events.go index c7f895234f0b..96ccc5577e33 100644 --- a/x/gov/types/events.go +++ b/x/gov/types/events.go @@ -10,6 +10,7 @@ const ( EventTypeCancelProposal = "cancel_proposal" AttributeKeyProposalResult = "proposal_result" + AttributeKeyVoter = "voter" AttributeKeyOption = "option" AttributeKeyProposalID = "proposal_id" AttributeKeyProposalMessages = "proposal_messages" // Msg type_urls in the proposal