fix: Forge fmt (after updating local foundry)
Took 6 minutes
This commit is contained in:
@@ -806,15 +806,15 @@ contract TychoRouter is
|
|||||||
/**
|
/**
|
||||||
* @dev Gets balance of a token for a given address. Supports both native ETH and ERC20 tokens.
|
* @dev Gets balance of a token for a given address. Supports both native ETH and ERC20 tokens.
|
||||||
*/
|
*/
|
||||||
// forgefmt: disable-start
|
|
||||||
function _balanceOf(address token, address owner)
|
function _balanceOf(address token, address owner)
|
||||||
internal
|
internal
|
||||||
view
|
view
|
||||||
returns (uint256)
|
returns (uint256)
|
||||||
{
|
{
|
||||||
return
|
return token == address(0)
|
||||||
token == address(0) ? owner.balance : IERC20(token).balanceOf(owner);
|
? owner.balance
|
||||||
}// forgefmt: disable-end
|
: IERC20(token).balanceOf(owner);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dev Verifies that the expected amount of output tokens was received by the receiver.
|
* @dev Verifies that the expected amount of output tokens was received by the receiver.
|
||||||
|
|||||||
@@ -93,10 +93,9 @@ contract CurveExecutor is IExecutor, RestrictTransferFrom {
|
|||||||
// crypto or llamma
|
// crypto or llamma
|
||||||
if (tokenIn == nativeToken || tokenOut == nativeToken) {
|
if (tokenIn == nativeToken || tokenOut == nativeToken) {
|
||||||
// slither-disable-next-line arbitrary-send-eth
|
// slither-disable-next-line arbitrary-send-eth
|
||||||
CryptoPoolETH(pool)
|
CryptoPoolETH(pool).exchange{value: ethAmount}(
|
||||||
.exchange{
|
uint256(int256(i)), uint256(int256(j)), amountIn, 0, true
|
||||||
value: ethAmount
|
);
|
||||||
}(uint256(int256(i)), uint256(int256(j)), amountIn, 0, true);
|
|
||||||
} else {
|
} else {
|
||||||
CryptoPool(pool)
|
CryptoPool(pool)
|
||||||
.exchange(
|
.exchange(
|
||||||
|
|||||||
@@ -216,9 +216,7 @@ contract TychoRouterSequentialSwapTest is TychoRouterTestSetup {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
uint256 amountOut = tychoRouter.sequentialSwapPermit2{
|
uint256 amountOut = tychoRouter.sequentialSwapPermit2{value: amountIn}(
|
||||||
value: amountIn
|
|
||||||
}(
|
|
||||||
amountIn,
|
amountIn,
|
||||||
address(0),
|
address(0),
|
||||||
USDC_ADDR,
|
USDC_ADDR,
|
||||||
|
|||||||
@@ -222,9 +222,7 @@ contract TychoRouterSingleSwapTest is TychoRouterTestSetup {
|
|||||||
bytes memory swap =
|
bytes memory swap =
|
||||||
encodeSingleSwap(address(usv2Executor), protocolData);
|
encodeSingleSwap(address(usv2Executor), protocolData);
|
||||||
|
|
||||||
uint256 amountOut = tychoRouter.singleSwapPermit2{
|
uint256 amountOut = tychoRouter.singleSwapPermit2{value: amountIn}(
|
||||||
value: amountIn
|
|
||||||
}(
|
|
||||||
amountIn,
|
amountIn,
|
||||||
address(0),
|
address(0),
|
||||||
DAI_ADDR,
|
DAI_ADDR,
|
||||||
|
|||||||
@@ -271,9 +271,7 @@ contract TychoRouterSplitSwapTest is TychoRouterTestSetup {
|
|||||||
bytes[] memory swaps = new bytes[](1);
|
bytes[] memory swaps = new bytes[](1);
|
||||||
swaps[0] = swap;
|
swaps[0] = swap;
|
||||||
|
|
||||||
uint256 amountOut = tychoRouter.splitSwapPermit2{
|
uint256 amountOut = tychoRouter.splitSwapPermit2{value: amountIn}(
|
||||||
value: amountIn
|
|
||||||
}(
|
|
||||||
amountIn,
|
amountIn,
|
||||||
address(0),
|
address(0),
|
||||||
DAI_ADDR,
|
DAI_ADDR,
|
||||||
|
|||||||
Reference in New Issue
Block a user