Skip to content

GetVote returns one voter's current vote on a voting challenge.

Returns the stored vote of one voter for one voting challenge proposal.

Example

bash
# [collection-id] [approval-level] [approver-address] [approval-id] [proposal-id] [voter-address]
bb query tokenization vote 1 collection "" multisig-approval proposal-1 bb1zc268nctj8xwslgw7q22cahs6k4y048agr6fvf
bash
curl "https://lcd.bitbadges.io/bitbadges/bitbadgeschain/tokenization/get_vote/1/collection//multisig-approval/proposal-1/bb1zc268nctj8xwslgw7q22cahs6k4y048agr6fvf"

Request

FieldTypeDescription
collectionIdstringCollection ID.
approvalLevelstringcollection, incoming, or outgoing.
approverAddressstringEmpty for collection.
approvalIdstringApproval that holds the voting challenge.
proposalIdstringproposalId of the VotingChallenge.
voterAddressstringVoter to look up.

Response

json
{
  "vote": {
    "proposalId": "proposal-1",
    "voter": "bb1zc268nctj8xwslgw7q22cahs6k4y048agr6fvf",
    "yesWeight": "100",
    "votedAt": "1788739200000"
  }
}
FieldTypeDescription
proposalIdstringProposal.
voterstringVoter.
yesWeightUintPercentage (0 to 100) of the voter's weight cast as yes.
votedAtUintUnix milliseconds when the vote was last cast.

Behavior

  • Returns gRPC NotFound (vote not found) when the voter has not voted.
  • The voter's contribution to quorum is voterWeight * yesWeight / 100, where voterWeight comes from the challenge's voters list.

Edit this page on GitHub