Skip to content

Commit e180308

Browse files
Transpile 23f4452b2
1 parent d0ae378 commit e180308

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

contracts/governance/extensions/GovernorCountingOverridableUpgradeable.sol

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ abstract contract GovernorCountingOverridableUpgradeable is Initializable, Gover
7070

7171
/**
7272
* @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.
7378
*/
7479
function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) {
7580
GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage();
@@ -144,7 +149,11 @@ abstract contract GovernorCountingOverridableUpgradeable is Initializable, Gover
144149
return totalWeight;
145150
}
146151

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+
*/
148157
function _countOverride(uint256 proposalId, address account, uint8 support) internal virtual returns (uint256) {
149158
GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage();
150159
ProposalVote storage proposalVote = $._proposalVotes[proposalId];
@@ -175,7 +184,7 @@ abstract contract GovernorCountingOverridableUpgradeable is Initializable, Gover
175184
return overridenWeight;
176185
}
177186

178-
/// @dev variant of {Governor-_castVote} that deals with vote overrides.
187+
/// @dev Variant of {Governor-_castVote} that deals with vote overrides.
179188
function _castOverride(
180189
uint256 proposalId,
181190
address account,

0 commit comments

Comments
 (0)