feat: Refactor callback to use transient storage

With this, we don't need the univ3 specific method in the router contract. This should be flexible enough for most protocols that integrate

TODO: is this safe enough??

--- don't change below this line ---
ENG-4411 Took 1 hour 52 minutes

Took 4 minutes

Took 5 minutes
This commit is contained in:
Diana Carvalho
2025-03-31 18:07:59 +01:00
parent 62754b195e
commit af449562b0
10 changed files with 45 additions and 102 deletions

View File

@@ -563,8 +563,6 @@ mod tests {
"6982508145454ce325ddbe47a25d4ec3d2311933",
// zero for one
"00",
// executor address
"f62849f9a0b5bf2913b396098f7c7019b51a820a",
// first pool intermediary token (ETH)
"0000000000000000000000000000000000000000",
// fee
@@ -1019,9 +1017,9 @@ mod tests {
let expected_swaps = String::from(concat!(
// length of ple encoded swaps without padding
"000000000000000000000000000000000000000000000000000000000000008c",
"0000000000000000000000000000000000000000000000000000000000000078",
// ple encoded swaps
"008a", // Swap length
"0076", // Swap length
"00", // token in index
"01", // token out index
"000000", // split
@@ -1031,7 +1029,6 @@ mod tests {
"a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // group token in
"6982508145454ce325ddbe47a25d4ec3d2311933", // group token in
"00", // zero2one
"f62849f9a0b5bf2913b396098f7c7019b51a820a", // executor address
// First pool params
"0000000000000000000000000000000000000000", // intermediary token (ETH)
"000bb8", // fee
@@ -1040,7 +1037,7 @@ mod tests {
"6982508145454ce325ddbe47a25d4ec3d2311933", // intermediary token (PEPE)
"0061a8", // fee
"0001f4", // tick spacing
"0000000000000000000000000000000000000000" // padding
"0000000000000000" // padding
));
let hex_calldata = encode(&calldata);