feat: Make USV3 callback work with direct executor call

- We have decided to now support calling our executors normally (without using delegatecalls) since they now support specifying token transfers.
- This was disabled for UniswapV3 in the past also because of data decoding issues. This seems to be the solution, though.
This commit is contained in:
TAMARA LIPOWSKI
2025-04-21 22:39:17 -04:00
committed by Diana Carvalho
parent ca349a8e11
commit 5562dd210e
2 changed files with 24 additions and 7 deletions

View File

@@ -129,13 +129,7 @@ contract UniswapV3Executor is IExecutor, ICallback, TokenTransfer {
int256, /* amount1Delta */
bytes calldata /* data */
) external {
uint256 dataOffset = 4 + 32 + 32 + 32; // Skip selector + 2 ints + data_offset
uint256 dataLength =
uint256(bytes32(msg.data[dataOffset:dataOffset + 32]));
bytes calldata fullData = msg.data[4:dataOffset + 32 + dataLength];
handleCallback(fullData);
handleCallback(msg.data);
}
function _decodeData(bytes calldata data)