chore: test rename, comment improvements
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -244,7 +244,7 @@ contract TychoRouterForEkuboTest is TychoRouterTestSetup {
|
|||||||
vm.startPrank(ALICE);
|
vm.startPrank(ALICE);
|
||||||
IERC20(USDE_ADDR).approve(tychoRouterAddr, type(uint256).max);
|
IERC20(USDE_ADDR).approve(tychoRouterAddr, type(uint256).max);
|
||||||
bytes memory callData =
|
bytes memory callData =
|
||||||
loadCallDataFromFile("test_single_ekubo_multi_hop");
|
loadCallDataFromFile("test_single_ekubo_grouped_swap");
|
||||||
(bool success,) = tychoRouterAddr.call(callData);
|
(bool success,) = tychoRouterAddr.call(callData);
|
||||||
|
|
||||||
vm.stopPrank();
|
vm.stopPrank();
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ pub static IN_TRANSFER_REQUIRED_PROTOCOLS: LazyLock<HashSet<&'static str>> = Laz
|
|||||||
set
|
set
|
||||||
});
|
});
|
||||||
|
|
||||||
// The protocols here are a subset of the ones defined in IN_TRANSFER_REQUIRED_PROTOCOLS. The in
|
/// The protocols here are a subset of the ones defined in IN_TRANSFER_REQUIRED_PROTOCOLS. The in
|
||||||
// transfer needs to be performed inside the callback logic. This means, the tokens can not be sent
|
/// transfer needs to be performed inside the callback logic. This means, the tokens can not be sent
|
||||||
// directly from the previous pool into a pool of this protocol. The tokens need to be sent to the
|
/// directly from the previous pool into a pool of this protocol. The tokens need to be sent to the
|
||||||
// router and only then transferred into the pool. This is the case for uniswap v3 because of the
|
/// router and only then transferred into the pool. This is the case for uniswap v3 because of the
|
||||||
// callback logic. The only way for this to work it would be to call the second swap during the
|
/// callback logic. The only way for this to work it would be to call the second swap during the
|
||||||
// callback of the first swap. This is currently not supported.
|
/// callback of the first swap. This is currently not supported.
|
||||||
pub static CALLBACK_CONSTRAINED_PROTOCOLS: LazyLock<HashSet<&'static str>> = LazyLock::new(|| {
|
pub static CALLBACK_CONSTRAINED_PROTOCOLS: LazyLock<HashSet<&'static str>> = LazyLock::new(|| {
|
||||||
let mut set = HashSet::new();
|
let mut set = HashSet::new();
|
||||||
set.insert("uniswap_v3");
|
set.insert("uniswap_v3");
|
||||||
@@ -54,8 +54,7 @@ pub static CALLBACK_CONSTRAINED_PROTOCOLS: LazyLock<HashSet<&'static str>> = Laz
|
|||||||
set
|
set
|
||||||
});
|
});
|
||||||
|
|
||||||
/// These groupable protocols use simple concatenation when forming swap groups instead of PLE
|
/// These groupable protocols use simple concatenation instead of PLE when forming swap groups.
|
||||||
/// encoding for grouped protocol data.
|
|
||||||
pub static NON_PLE_ENCODED_PROTOCOLS: LazyLock<HashSet<&'static str>> = LazyLock::new(|| {
|
pub static NON_PLE_ENCODED_PROTOCOLS: LazyLock<HashSet<&'static str>> = LazyLock::new(|| {
|
||||||
let mut set = HashSet::new();
|
let mut set = HashSet::new();
|
||||||
set.insert("ekubo_v2");
|
set.insert("ekubo_v2");
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ fn test_single_encoding_strategy_ekubo_grouped_swap() {
|
|||||||
.data;
|
.data;
|
||||||
|
|
||||||
let hex_calldata = encode(&calldata);
|
let hex_calldata = encode(&calldata);
|
||||||
write_calldata_to_file("test_single_ekubo_multi_hop", hex_calldata.as_str());
|
write_calldata_to_file("test_single_ekubo_grouped_swap", hex_calldata.as_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user