fix: Fix tests (not there yet)

Took 58 minutes
This commit is contained in:
Diana Carvalho
2025-05-16 17:57:29 +01:00
parent eeebd51114
commit d4244a7089
23 changed files with 417 additions and 300 deletions

View File

@@ -3,7 +3,7 @@ pragma solidity ^0.8.26;
import "../TestUtils.sol";
import {Constants} from "../Constants.sol";
import {EkuboExecutor} from "@src/executors/EkuboExecutor.sol";
import "@src/executors/EkuboExecutor.sol";
import {ICore} from "@ekubo/interfaces/ICore.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {NATIVE_TOKEN_ADDRESS} from "@ekubo/math/constants.sol";
@@ -45,8 +45,7 @@ contract EkuboExecutorTest is Constants, TestUtils {
uint256 usdcBalanceBeforeExecutor = USDC.balanceOf(address(executor));
bytes memory data = abi.encodePacked(
false, // transferFromNeeded (transfer user to core)
true, // transferNeeded (transfer from executor to core)
uint8(RestrictTransferFrom.TransferType.Transfer), // transfer type (transfer from executor to core)
address(executor), // receiver
NATIVE_TOKEN_ADDRESS, // tokenIn
USDC_ADDR, // tokenOut
@@ -83,8 +82,7 @@ contract EkuboExecutorTest is Constants, TestUtils {
uint256 ethBalanceBeforeExecutor = address(executor).balance;
bytes memory data = abi.encodePacked(
false, // transferFromNeeded (transfer user to core)
true, // transferNeeded (transfer from executor to core)
uint8(RestrictTransferFrom.TransferType.Transfer), // transferNeeded (transfer from executor to core)
address(executor), // receiver
USDC_ADDR, // tokenIn
NATIVE_TOKEN_ADDRESS, // tokenOut
@@ -142,8 +140,7 @@ contract EkuboExecutorTest is Constants, TestUtils {
// Same test case as in swap_encoder::tests::ekubo::test_encode_swap_multi
function testMultiHopSwap() public {
bytes memory data = abi.encodePacked(
false, // transferFromNeeded (transfer user to core)
true, // transferNeeded (transfer from executor to core)
uint8(RestrictTransferFrom.TransferType.Transfer), // transferNeeded (transfer from executor to core)
address(executor), // receiver
NATIVE_TOKEN_ADDRESS, // tokenIn
USDC_ADDR, // tokenOut of 1st swap