mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-13 03:25:20 +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
|
AttributeKeyCommitteeID = types.AttributeKeyCommitteeID
|
||||||
AttributeKeyProposalCloseStatus = types.AttributeKeyProposalCloseStatus
|
AttributeKeyProposalCloseStatus = types.AttributeKeyProposalCloseStatus
|
||||||
AttributeKeyProposalID = types.AttributeKeyProposalID
|
AttributeKeyProposalID = types.AttributeKeyProposalID
|
||||||
|
AttributeKeyVoter = types.AttributeKeyVoter
|
||||||
AttributeValueCategory = types.AttributeValueCategory
|
AttributeValueCategory = types.AttributeValueCategory
|
||||||
AttributeValueProposalFailed = types.AttributeValueProposalFailed
|
AttributeValueProposalFailed = types.AttributeValueProposalFailed
|
||||||
AttributeValueProposalPassed = types.AttributeValueProposalPassed
|
AttributeValueProposalPassed = types.AttributeValueProposalPassed
|
||||||
|
@ -74,6 +74,7 @@ func (k Keeper) AddVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress
|
|||||||
types.EventTypeProposalVote,
|
types.EventTypeProposalVote,
|
||||||
sdk.NewAttribute(types.AttributeKeyCommitteeID, fmt.Sprintf("%d", com.ID)),
|
sdk.NewAttribute(types.AttributeKeyCommitteeID, fmt.Sprintf("%d", com.ID)),
|
||||||
sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", pr.ID)),
|
sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", pr.ID)),
|
||||||
|
sdk.NewAttribute(types.AttributeKeyVoter, voter.String()),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
return nil
|
return nil
|
||||||
|
@ -10,6 +10,7 @@ const (
|
|||||||
AttributeKeyCommitteeID = "committee_id"
|
AttributeKeyCommitteeID = "committee_id"
|
||||||
AttributeKeyProposalID = "proposal_id"
|
AttributeKeyProposalID = "proposal_id"
|
||||||
AttributeKeyProposalCloseStatus = "status"
|
AttributeKeyProposalCloseStatus = "status"
|
||||||
|
AttributeKeyVoter = "voter"
|
||||||
AttributeValueProposalPassed = "proposal_passed"
|
AttributeValueProposalPassed = "proposal_passed"
|
||||||
AttributeValueProposalTimeout = "proposal_timeout"
|
AttributeValueProposalTimeout = "proposal_timeout"
|
||||||
AttributeValueProposalFailed = "proposal_failed"
|
AttributeValueProposalFailed = "proposal_failed"
|
||||||
|
Loading…
Reference in New Issue
Block a user