test: add single, split and sequential scenarios

This commit is contained in:
pedrobergamini
2025-06-04 19:12:56 -03:00
parent af0f4c454e
commit 6f80137117
4 changed files with 75 additions and 4 deletions

View File

@@ -295,4 +295,21 @@ contract TychoRouterTestProtocolIntegration is TychoRouterTestSetup {
vm.stopPrank();
}
function testSingleBebopIntegration() public {
deal(USDC_ADDR, ALICE, 1000 * 10 ** 6);
uint256 expAmountOut = 1; // Expected minimum WETH amount out
vm.startPrank(ALICE);
IERC20(USDC_ADDR).approve(tychoRouterAddr, type(uint256).max);
bytes memory callData = loadCallDataFromFile("test_encode_bebop_rfq");
(bool success,) = tychoRouterAddr.call(callData);
uint256 finalBalance = IERC20(WETH_ADDR).balanceOf(ALICE);
assertTrue(success, "Call Failed");
assertGe(finalBalance, expAmountOut);
assertEq(IERC20(USDC_ADDR).balanceOf(tychoRouterAddr), 0);
vm.stopPrank();
}
}