浏览代码

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

Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Ernesto García 5 月之前
父节点
当前提交
06ea3b1b4e
共有 1 个文件被更改,包括 3 次插入0 次删除
  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) {
             (, bool withDelay, ) = _getManagerData(plan, i);
             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);
                 _setManagerData(plan, i, true, nonce);
             }