test: add single, split and sequential scenarios
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user