Skip to main content

Module decision_proposal

Module decision_proposal 

Source
Expand description

Decision proposals (protocol version 15).

A decision proposal is a yes/no question any identity puts to the masternodes: a proposal document of the decision proposals system contract. Creating one opens a yes/no vote poll (YesNoVotePoll) whose purpose is the proposal (YesNoVotePollPurpose::DecisionProposal) and whose rule is the one the proposal states, and funds the poll’s votes with the decision proposal fund, which the proposer pays. Proposals are signaling only: nothing acts on a result, which stays in the poll’s stored info.

DecisionProposalVotePoll::from_proposal reads the poll a proposal opens from its id and properties. Consensus uses it to open the poll, and clients to name the poll they query.

A multiple choice proposal opens no yes/no poll: its choices contend in a masternode vote among documents, which multiple_choice names for clients.

Modules§

multiple_choice
Multiple choice proposals (protocol version 15): what clients name them and their vote by.
properties
The properties of a proposal.

Structs§

DecisionProposalVotePoll
The yes/no poll a decision proposal opens and when it closes.

Constants§

DECISION_PROPOSALS_CONTRACT_ID
The id of the decision proposals system contract, 3iNyoNwjCTkb7XS3RHyWUtLx7pgC6AFAEQNNDHzxqngF.
DECISION_PROPOSAL_FUND_NAME
The name a proposal’s create states its fund under, in its prefunded voting balance: the proposal’s own type. A contested create names its contested index there instead.
MULTIPLE_CHOICE_PROPOSAL_DOCUMENT_TYPE_NAME
The name of the multiple choice proposal document type: a question whose answers are the choices entered for it, which contend in a masternode vote the first choice opens.
PROPOSAL_DOCUMENT_TYPE_NAME
The name of the proposal document type.

Functions§

decision_proposal_required_fund
The fund a decision proposal’s create must state, exactly: the fee version’s decision_proposal_fund_required_amount. It prefunds the votes on the poll; what is left when the poll ends goes to processing fees.
decision_proposal_vote_poll_id
The id of the yes/no poll the proposal document_id opens: the id of the purpose YesNoVotePollPurpose::DecisionProposal, which a vote on the proposal names and the poll queries take. Known from the proposal’s id alone, before or after the poll opens.
is_decision_proposal
Whether a document of document_type_name in the contract contract_id is a decision proposal: a proposal of the decision proposals contract. Its create opens a yes/no poll and states the decision proposal fund instead of a contest’s.
is_multiple_choice_proposal
Whether a document of document_type_name in the contract contract_id is a multiple choice proposal: a multipleChoiceProposal of the decision proposals contract. Its create opens no poll and states no fund; it pays the multiple choice proposal processing fee.
multiple_choice_proposal_processing_fee
What creating one multiple choice proposal adds to the processing fee of its batch: the fee version’s multiple_choice_proposal_processing_fee. Unlike a yes/no proposal’s fund it prefunds no votes, since the proposal opens no poll: it goes to the processing fee pools, and the create does not state it. 0 before protocol version 15.