Skip to content

Commit

Permalink
feat(x/gov): Emit VoterAddr (#17354)
Browse files Browse the repository at this point in the history
(cherry picked from commit 85d9791)

# Conflicts:
#	x/gov/types/events.go
  • Loading branch information
itsdevbear authored and mergify[bot] committed Aug 11, 2023
1 parent 0f3a2ec commit 4d66f52
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions x/gov/keeper/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func (keeper Keeper) AddVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.A
ctx.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)),
),
Expand Down
20 changes: 20 additions & 0 deletions x/gov/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const (
EventTypeActiveProposal = "active_proposal"
EventTypeSignalProposal = "signal_proposal"

<<<<<<< HEAD

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected 'IDENT', found '<<'

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected ';', found '<<'

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected 'IDENT', found '<<' (typecheck)

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: unexpected <<, expecting name

Check failure on line 12 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected <<, expecting name
AttributeKeyProposalResult = "proposal_result"
AttributeKeyOption = "option"
AttributeKeyProposalID = "proposal_id"
Expand All @@ -21,4 +22,23 @@ const (
AttributeKeyProposalType = "proposal_type"
AttributeSignalTitle = "signal_title"
AttributeSignalDescription = "signal_description"
=======
AttributeKeyProposalResult = "proposal_result"
AttributeKeyVoter = "voter"
AttributeKeyOption = "option"
AttributeKeyProposalID = "proposal_id"
AttributeKeyProposalMessages = "proposal_messages" // Msg type_urls in the proposal
AttributeKeyVotingPeriodStart = "voting_period_start"
AttributeKeyProposalLog = "proposal_log" // log of proposal execution
AttributeValueProposalDropped = "proposal_dropped" // didn't meet min deposit
AttributeValueProposalPassed = "proposal_passed" // met vote quorum
AttributeValueProposalRejected = "proposal_rejected" // didn't meet vote quorum
AttributeValueExpeditedProposalRejected = "expedited_proposal_rejected" // didn't meet expedited vote quorum
AttributeValueProposalFailed = "proposal_failed" // error on proposal handler
AttributeValueProposalCanceled = "proposal_canceled" // error on proposal handler

AttributeKeyProposalType = "proposal_type"
AttributeSignalTitle = "signal_title"
AttributeSignalDescription = "signal_description"
>>>>>>> 85d9791ed (feat(x/gov): Emit VoterAddr (#17354))

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / dependency-review

illegal character U+0023 '#'

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / golangci-lint

invalid character U+0023 '#' (typecheck)

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / golangci-lint

illegal character U+0023 '#' (typecheck)

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (03)

invalid character U+0023 '#'

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected : after top level declaration

Check failure on line 43 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / tests (02)

invalid character U+0023 '#'
)

Check failure on line 44 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected ')', found 'EOF'

Check failure on line 44 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected ';', found 'EOF'

Check failure on line 44 in x/gov/types/events.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected ')', found 'EOF' (typecheck)

0 comments on commit 4d66f52

Please sign in to comment.