@@ -70,6 +70,11 @@ abstract contract GovernorCountingOverridableUpgradeable is Initializable, Gover
70
70
71
71
/**
72
72
* @dev See {IGovernor-hasVoted}.
73
+ *
74
+ * NOTE: Calling {castVote} (or similar) casts a vote using the voting power that is delegated to the voter.
75
+ * Conversely, calling {castOverrideVote} (or similar) uses the voting power of the account itself, from its asset
76
+ * balances. Casting an "override vote" does not count as voting and won't be reflected by this getter. Consider
77
+ * using {hasVotedOverride} to check if an account has casted an "override vote" for a given proposal id.
73
78
*/
74
79
function hasVoted (uint256 proposalId , address account ) public view virtual override returns (bool ) {
75
80
GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage ();
@@ -144,7 +149,11 @@ abstract contract GovernorCountingOverridableUpgradeable is Initializable, Gover
144
149
return totalWeight;
145
150
}
146
151
147
- /// @dev Variant of {Governor-_countVote} that deals with vote overrides.
152
+ /**
153
+ * @dev Variant of {Governor-_countVote} that deals with vote overrides.
154
+ *
155
+ * NOTE: See {hasVoted} for more details about the difference between {castVote} and {castOverrideVote}.
156
+ */
148
157
function _countOverride (uint256 proposalId , address account , uint8 support ) internal virtual returns (uint256 ) {
149
158
GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage ();
150
159
ProposalVote storage proposalVote = $._proposalVotes[proposalId];
@@ -175,7 +184,7 @@ abstract contract GovernorCountingOverridableUpgradeable is Initializable, Gover
175
184
return overridenWeight;
176
185
}
177
186
178
- /// @dev variant of {Governor-_castVote} that deals with vote overrides.
187
+ /// @dev Variant of {Governor-_castVote} that deals with vote overrides.
179
188
function _castOverride (
180
189
uint256 proposalId ,
181
190
address account ,
0 commit comments