fix(univ4): Append callback data instead of prepending

Bring back tests on the executor level. This way the executor can actually be used alone

--- don't change below this line ---
ENG-4222 Took 12 minutes
This commit is contained in:
Diana Carvalho
2025-02-14 11:43:59 +00:00
parent 21a8c1a27a
commit 4d0f5cec64
3 changed files with 85 additions and 12 deletions

View File

@@ -449,9 +449,9 @@ contract TychoRouter is
returns (bytes memory)
{
require(data.length >= 20, "Invalid data length");
address executor = address(uint160(bytes20(data[0:20])));
bytes4 selector = bytes4(data[20:24]);
bytes memory protocolData = data[24:];
bytes4 selector = bytes4(data[data.length - 4:]);
address executor = address(uint160(bytes20(data[data.length - 24:data.length - 4])));
bytes memory protocolData = data[:data.length - 24];
if (!executors[executor]) {
revert ExecutionDispatcher__UnapprovedExecutor();