fix: Verify that the executor exists in the uni v4 callback

--- don't change below this line ---
ENG-4223 Took 10 minutes
This commit is contained in:
Diana Carvalho
2025-02-13 09:46:14 +00:00
parent 591d73ba71
commit 4c5e3bf6a9

View File

@@ -453,6 +453,10 @@ contract TychoRouter is
address executor = address(uint160(bytes20(data[data.length - 20:])));
bytes memory protocolData = data[:data.length - 24];
if (!executors[executor]) {
revert ExecutionDispatcher__UnapprovedExecutor();
}
// slither-disable-next-line controlled-delegatecall,low-level-calls
(bool success,) = executor.delegatecall(
abi.encodeWithSelector(selector, protocolData)