Skip to content

Commit 149fe65

Browse files
committed
Documentaton nits
1 parent 72a420b commit 149fe65

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

contracts/governance/extensions/GovernorCountingFractional.sol

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,24 +103,24 @@ abstract contract GovernorCountingFractional is Governor {
103103
* @dev See {Governor-_countVote}. Function that records the delegate's votes.
104104
*
105105
* Executing this function consumes (part of) the delegate's weight on the proposal. This weight can be
106-
* distributed amongst the 3 options (Against, For, Abstain) by specifying a Fractional `support`.
106+
* distributed amongst the 3 options (Against, For, Abstain) by specifying a fractional `support`.
107107
*
108108
* This counting module supports two vote casting modes: nominal and fractional.
109109
*
110-
* - Voting in "nomainal" mode is achieved by setting `support` to on of the 3 bravo options (Against, For,
111-
* Abstain). In this mode, the `params` argument must be empty and the delegate's full remaining weight is cast
112-
* for the specified `support` option, as in {GovernorCountingSimple} and following the `VoteType` enum from
113-
* Governor Bravo. As a consequence, no vote weight remains unspend so no further voting is possible (for this
114-
* `proposalId` and this `account`).
110+
* - Nominal: A nominal vote is cast by setting `support` to one of the 3 bravo options (Against, For, Abstain).
111+
* - Fractional: A fractional vote is cast by setting `support` to `type(uint8).max` (255).
115112
*
116-
* - Voting in "fractional" mode is achieved by setting `support` to `type(uint8).max` (255). In this mode, the
117-
* `params` argument must be tree packed `uint128` values representing the weight the delegate assigns to each
118-
* support option (Against, For, and Abstain respectively). This format can be produced using:
113+
* Casting a nominal vote requires `params` to be empty and consumes the delegate's full remaining weight on the
114+
* proposal for the specified `support` option. This is similar to the {GovernorCountingSimple} module and follows
115+
* the `VoteType` enum from Governor Bravo. As a consequence, no vote weight remains unspent so no further voting
116+
* is possible (for this `proposalId` and this `account`).
119117
*
120-
* `abi.encodePacked(uint128(againstVotes), uint128(forVotes), uint128(abstainVotes))`
118+
* Casting a fractional vote consumes a fraction of the delegate's remaining weight on the proposal according to the
119+
* weights the delegate assigns to each support option (Against, For, Abstain respectively). The sum total of the
120+
* three decoded vote weights _must_ be less than or equal to the delegate's remaining weight on the proposal (i.e.
121+
* their checkpointed total weight minus votes already cast on the proposal). This format can be produced using:
121122
*
122-
* The sum total of the three decoded vote weights _must_ be less than or equal to the delegate's remaining weight
123-
* on the proposal, i.e. their checkpointed total weight minus votes already cast on the proposal.
123+
* `abi.encodePacked(uint128(againstVotes), uint128(forVotes), uint128(abstainVotes))`
124124
*
125125
* NOTE: Consider that fractional voting restricts the number of casted vote (in each category) to 128 bits.
126126
* Depending on how many decimals the underlying token has, a single voter may require to split their vote into

0 commit comments

Comments
 (0)