Skip to content

Commit

Permalink
Update comments per recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
arr00 committed Aug 4, 2024
1 parent e3b36ad commit 8340937
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/GovernorBravoDelegate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ contract GovernorBravoDelegate is
}

/**
* @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold
* @notice Cancels a proposal if sender is the proposer or proposalGuardian. Can be called by anyone if the proposer delegates dropped below proposal threshold.
* @param proposalId The id of the proposal to cancel
*/
function cancel(uint proposalId) external {
Expand All @@ -379,14 +379,14 @@ contract GovernorBravoDelegate is

Proposal storage proposal = proposals[proposalId];

// Proposer can cancel
// Proposer or proposalGuardian can cancel
if (msg.sender != proposal.proposer && msg.sender != proposalGuardian) {
require(
(comp.getPriorVotes(proposal.proposer, block.number - 1) <
proposalThreshold),
"GovernorBravo::cancel: proposer above threshold"
);
// Whitelisted proposers can't be canceled for falling below proposal threshold
// Only whitelist guardian can cancel proposals from whitelisted proposers with delegations below the proposal threshold
if (isWhitelisted(proposal.proposer)) {
require(
msg.sender == whitelistGuardian,
Expand Down

0 comments on commit 8340937

Please sign in to comment.