mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
add voter address to vote event
This commit is contained in:
parent
c1e9a87fb3
commit
deef10a872
@ -12,6 +12,7 @@ const (
|
||||
AttributeKeyCommitteeID = types.AttributeKeyCommitteeID
|
||||
AttributeKeyProposalCloseStatus = types.AttributeKeyProposalCloseStatus
|
||||
AttributeKeyProposalID = types.AttributeKeyProposalID
|
||||
AttributeKeyVoter = types.AttributeKeyVoter
|
||||
AttributeValueCategory = types.AttributeValueCategory
|
||||
AttributeValueProposalFailed = types.AttributeValueProposalFailed
|
||||
AttributeValueProposalPassed = types.AttributeValueProposalPassed
|
||||
|
@ -74,6 +74,7 @@ func (k Keeper) AddVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress
|
||||
types.EventTypeProposalVote,
|
||||
sdk.NewAttribute(types.AttributeKeyCommitteeID, fmt.Sprintf("%d", com.ID)),
|
||||
sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", pr.ID)),
|
||||
sdk.NewAttribute(types.AttributeKeyVoter, voter.String()),
|
||||
),
|
||||
)
|
||||
return nil
|
||||
|
@ -10,6 +10,7 @@ const (
|
||||
AttributeKeyCommitteeID = "committee_id"
|
||||
AttributeKeyProposalID = "proposal_id"
|
||||
AttributeKeyProposalCloseStatus = "status"
|
||||
AttributeKeyVoter = "voter"
|
||||
AttributeValueProposalPassed = "proposal_passed"
|
||||
AttributeValueProposalTimeout = "proposal_timeout"
|
||||
AttributeValueProposalFailed = "proposal_failed"
|
||||
|
Loading…
Reference in New Issue
Block a user