feat: Proper USV3Executor transfer decoding + tests
- Properly decode, update tests with proper decoding - Added test case for each transfer method - Also fully tested permit2 transferFrom and it works perfectly. NOTE: UniswapV3 doesn't support NONE as a transfer method. TODO: - Fix integration tests once encoding is implemented.
This commit is contained in:
committed by
Diana Carvalho
parent
30557e7e54
commit
e3ac394d27
@@ -149,7 +149,7 @@ contract UniswapV3Executor is IExecutor, ICallback, ExecutorTransferMethods {
|
||||
TransferMethod method
|
||||
)
|
||||
{
|
||||
if (data.length != 84) {
|
||||
if (data.length != 85) {
|
||||
revert UniswapV3Executor__InvalidDataLength();
|
||||
}
|
||||
tokenIn = address(bytes20(data[0:20]));
|
||||
@@ -158,7 +158,7 @@ contract UniswapV3Executor is IExecutor, ICallback, ExecutorTransferMethods {
|
||||
receiver = address(bytes20(data[43:63]));
|
||||
target = address(bytes20(data[63:83]));
|
||||
zeroForOne = uint8(data[83]) > 0;
|
||||
method = TransferMethod.TRANSFER;
|
||||
method = TransferMethod(uint8(data[84]));
|
||||
}
|
||||
|
||||
function _makeV3CallbackData(
|
||||
|
||||
Reference in New Issue
Block a user