Fix documentation inaccuracies in Governor (#4815)

pull/4546/head^2
Ernesto García 1 year ago committed by GitHub
parent 04cb014144
commit b4ceb054de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      contracts/governance/extensions/GovernorTimelockAccess.sol
  2. 2
      contracts/governance/extensions/GovernorTimelockCompound.sol
  3. 5
      contracts/governance/extensions/GovernorTimelockControl.sol

@ -35,6 +35,9 @@ import {Time} from "../../utils/types/Time.sol";
* mitigate this attack vector, the governor is able to ignore the restrictions claimed by the `AccessManager` using
* {setAccessManagerIgnored}. While permanent denial of service is mitigated, temporary DoS may still be technically
* possible. All of the governor's own functions (e.g., {setBaseDelaySeconds}) ignore the `AccessManager` by default.
*
* NOTE: `AccessManager` does not support scheduling more than one operation with the same target and calldata at
* the same time. See {AccessManager-schedule} for a workaround.
*/
abstract contract GovernorTimelockAccess is Governor {
// An execution plan is produced at the moment a proposal is created, in order to fix at that point the exact

@ -16,7 +16,7 @@ import {SafeCast} from "../../utils/math/SafeCast.sol";
*
* Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,
* the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be
* inaccessible.
* inaccessible from a proposal, unless executed via {Governor-relay}.
*/
abstract contract GovernorTimelockCompound is Governor {
ICompoundTimelock private _timelock;

@ -11,7 +11,7 @@ import {SafeCast} from "../../utils/math/SafeCast.sol";
/**
* @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a
* delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The
* {Governor} needs the proposer (and ideally the executor) roles for the {Governor} to work properly.
* {Governor} needs the proposer (and ideally the executor and canceller) roles for the {Governor} to work properly.
*
* Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,
* the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be
@ -21,9 +21,6 @@ import {SafeCast} from "../../utils/math/SafeCast.sol";
* risky, as it grants them the ability to: 1) execute operations as the timelock, and thus possibly performing
* operations or accessing funds that are expected to only be accessible through a vote, and 2) block governance
* proposals that have been approved by the voters, effectively executing a Denial of Service attack.
*
* NOTE: `AccessManager` does not support scheduling more than one operation with the same target and calldata at
* the same time. See {AccessManager-schedule} for a workaround.
*/
abstract contract GovernorTimelockControl is Governor {
TimelockController private _timelock;

Loading…
Cancel
Save