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:
@@ -453,6 +453,10 @@ contract TychoRouter is
|
|||||||
address executor = address(uint160(bytes20(data[data.length - 20:])));
|
address executor = address(uint160(bytes20(data[data.length - 20:])));
|
||||||
bytes memory protocolData = data[:data.length - 24];
|
bytes memory protocolData = data[:data.length - 24];
|
||||||
|
|
||||||
|
if (!executors[executor]) {
|
||||||
|
revert ExecutionDispatcher__UnapprovedExecutor();
|
||||||
|
}
|
||||||
|
|
||||||
// slither-disable-next-line controlled-delegatecall,low-level-calls
|
// slither-disable-next-line controlled-delegatecall,low-level-calls
|
||||||
(bool success,) = executor.delegatecall(
|
(bool success,) = executor.delegatecall(
|
||||||
abi.encodeWithSelector(selector, protocolData)
|
abi.encodeWithSelector(selector, protocolData)
|
||||||
|
|||||||
Reference in New Issue
Block a user