Skip to main content

Module multiple_choice

Module multiple_choice 

Source
Expand description

Multiple choice proposals (protocol version 15): what clients name them and their vote by.

A multiple choice proposal is a multipleChoiceProposal document of the decision proposals contract; its answers are choice documents, which contend in a masternode vote among documents (ContestedIndexResolution::MasternodeVoteOnDocuments). The vote is keyed by the proposal’s id (multiple_choice_proposal_vote_poll), and a choice is named in it by its own document id, wherever a contest among identities names a contender by an identity id (MultipleChoiceVoteChoice).

Modules§

choice_properties
The properties of a choice.
proposal_properties
The properties of a multiple choice proposal.

Enums§

MultipleChoiceVoteChoice
A masternode’s answer in the vote among a multiple choice proposal’s choices.

Constants§

CHOICE_CONTEST_INDEX_NAME
The contested index every choice falls under, on the proposal it answers. A choice’s create states its contest fund under this name.
CHOICE_DOCUMENT_TYPE_NAME
The name of the choice document type: an answer to a multiple choice proposal.

Functions§

is_choice
Whether a document of document_type_name in the contract contract_id is a choice: a choice of the decision proposals contract. Its create joins the vote among the choices of the proposal it answers, or opens it.
multiple_choice_proposal_vote
A masternode’s vote vote_choice in the vote among the choices of the multiple choice proposal proposal_id, to sign as a masternode vote transition.
multiple_choice_proposal_vote_poll
The vote among the choices of the multiple choice proposal proposal_id: the contest of the choice type’s byProposal index at that proposal, as a choice’s create derives it from its proposalId. The contested resource queries take it, and a masternode’s vote names it. Known from the proposal’s id alone, whether or not a choice has opened the vote.