feat: Smother slither and add a reentrancy guard in swap()

--- don't change below this line ---
ENG-4041 Took 34 minutes
This commit is contained in:
Diana Carvalho
2025-01-28 13:03:04 +00:00
parent c2347ac79e
commit dfa7033d2e
3 changed files with 12 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ contract ExecutionDispatcher {
* @dev Calls an executor, assumes swap.protocolData contains
* protocol-specific data required by the executor.
*/
// slither-disable-next-line dead-code
// slither-disable-next-line delegatecall-loop
function _callExecutor(
address executor,
bytes4 selector,
@@ -62,8 +62,7 @@ contract ExecutionDispatcher {
}
selector = selector == bytes4(0) ? IExecutor.swap.selector : selector;
// slither-disable-next-line low-level-calls
// slither-disable-next-line controlled-delegatecall,low-level-calls
(bool success, bytes memory result) = executor.delegatecall(
abi.encodeWithSelector(selector, amount, data)
);