Browse Source

Add Slither reentrancy exception to `GovernorTimelockAccess._queueOperations` (#5643)

Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Ernesto García 5 months ago
parent
commit
06ea3b1b4e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      contracts/governance/extensions/GovernorTimelockAccess.sol

+ 3 - 0
contracts/governance/extensions/GovernorTimelockAccess.sol

@@ -237,6 +237,9 @@ abstract contract GovernorTimelockAccess is Governor {
         for (uint256 i = 0; i < targets.length; ++i) {
         for (uint256 i = 0; i < targets.length; ++i) {
             (, bool withDelay, ) = _getManagerData(plan, i);
             (, bool withDelay, ) = _getManagerData(plan, i);
             if (withDelay) {
             if (withDelay) {
+                // This function can reenter when calling `_manager.schedule` before performing state updates in `_setManagerData`.
+                // However, the `manager` is a trusted contract in the current context's security model (e.g. an `AccessManager`).
+                // slither-disable-next-line reentrancy-no-eth
                 (, uint32 nonce) = _manager.schedule(targets[i], calldatas[i], etaSeconds);
                 (, uint32 nonce) = _manager.schedule(targets[i], calldatas[i], etaSeconds);
                 _setManagerData(plan, i, true, nonce);
                 _setManagerData(plan, i, true, nonce);
             }
             }