fix: Make all tests pass!

Delete TokenTransfer.sol
Make slither happy

Bugfixes:
- Executors
  - Ekubo:
    - Fix the POOL_DATA_OFFSET value and remove sender from callback data
    - Use SafeERC20
  - Maverick and Univ2: Use safeTransfer and not safeTransferFrom
  - Univ3: update expected data length
  - Univ4: update the selectors (the signature changed)
- Router:
  - For split swap we don't need to pass the tokenInReceiver, it should always be the router address
  - For single and sequential: change order of the parameters (to be before the permit2 specific objects)
- Encoders:
  - Update selector signatures
  - For split swap pass the transfer_from (we might not need to if the token in is ETH)

Took 2 hours 51 minutes
This commit is contained in:
Diana Carvalho
2025-05-15 13:11:34 +01:00
parent 27dfde3118
commit ee687038c5
20 changed files with 126 additions and 197 deletions

View File

@@ -462,7 +462,7 @@ mod tests {
Bytes::from_str("0x3ede3eca2a72b3aecc820e955b36f38437d01395").unwrap()
);
// single swap selector
assert_eq!(&hex::encode(transactions[0].clone().data)[..8], "20144a07");
assert_eq!(&hex::encode(transactions[0].clone().data)[..8], "cc60c623");
}
#[test]
@@ -487,7 +487,7 @@ mod tests {
let transactions = transactions.unwrap();
assert_eq!(transactions.len(), 1);
// single swap selector
assert_eq!(&hex::encode(transactions[0].clone().data)[..8], "20144a07");
assert_eq!(&hex::encode(transactions[0].clone().data)[..8], "cc60c623");
}
#[test]
@@ -534,7 +534,7 @@ mod tests {
assert_eq!(transactions.len(), 1);
assert_eq!(transactions[0].value, eth_amount_in);
// sequential swap selector
assert_eq!(&hex::encode(transactions[0].clone().data)[..8], "e8a980d7");
assert_eq!(&hex::encode(transactions[0].clone().data)[..8], "59e3efbb");
}
#[test]