evm-tokenvote

Voting machine using ERC20 tokens as votes.
Info | Log | Files | Refs | README

results.texi (1789B)


      1 @node results
      2 @chapter Results
      3 
      4 
      5 A proposal vote is completed if either of the following are true:
      6 
      7 @itemize
      8 @item The deadline has been reached
      9 @item Proposal contains zero or one options, and target participation has been reached.
     10 @item Cancellation votes have the majority.
     11 @end itemize
     12 
     13 
     14 @section Finalizing the proposal
     15 
     16 Once a proposal vote has been completed, the proposal must be explicitly finalized.
     17 
     18 Finalization analyzes the results of the vote, and marks the proposal state accordingly.
     19 
     20 It also moves the proposal cursor to activate the next proposal in the queue.
     21 
     22 Finally, it releases the ERC20 tokens used for the vote.
     23 
     24 Finalization is performed using the @code{finalize()} contract method. It will fail if used before the proposal vote has been @emph{completed}.
     25 
     26 
     27 @subsection Enhanced results
     28 
     29 The optional method @code{scan(uint256 _proposalIndex, uint256 _count} can be called on a completed proposal to further analyze the results of the vote.
     30 
     31 In the current state of the contract, it will iterate the options of the proposal, and mark the state as @code{TIED} if two or more options have the same amount of votes.
     32 
     33 This method may be called any time after proposal has been completed (even before @code{finalize()}. The proposal is identified by the @code{_proposalIndex} parameter, where the index is the order of addition of the proposal.
     34 
     35 The @code{_count} parameter limits the amount of options that will be scanned. A consecutive call will start at the option where the previous left off. 
     36 
     37 
     38 
     39 @section Recovering tokens
     40 
     41 Before a new vote can take place, the ERC20 tokens used in previous voting must be withdrawn.
     42 
     43 Withdrawal is performed using the @code{withdraw()} contract method. It will fail if used before the proposal vote has been @emph{finalized}.