Skip to content

Commit

Permalink
Ignore slither warnings for arbitrary-send
Browse files Browse the repository at this point in the history
  • Loading branch information
penandlim committed Jun 15, 2021
1 parent 3c3c095 commit b2aa4e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/SwapEthWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ contract SwapEthWrapper {
pooledTokens[i].safeTransfer(msg.sender, amounts[i]);
} else {
IWETH9(weth).withdraw(amounts[i]);
// slither-disable-next-line arbitrary-send
(bool success, ) = msg.sender.call{value: amounts[i]}("");
require(success, "ETH_TRANSFER_FAILED");
}
Expand Down Expand Up @@ -168,6 +169,7 @@ contract SwapEthWrapper {
pooledTokens[tokenIndex].safeTransfer(msg.sender, amount);
} else {
IWETH9(weth).withdraw(amount);
// slither-disable-next-line arbitrary-send
(bool success, ) = msg.sender.call{value: amount}("");
require(success, "ETH_TRANSFER_FAILED");
}
Expand Down Expand Up @@ -208,6 +210,7 @@ contract SwapEthWrapper {
pooledTokens[i].safeTransfer(msg.sender, amounts[i]);
} else {
IWETH9(weth).withdraw(amounts[i]);
// slither-disable-next-line arbitrary-send
(bool success, ) = msg.sender.call{value: amounts[i]}("");
require(success, "ETH_TRANSFER_FAILED");
}
Expand Down Expand Up @@ -265,6 +268,7 @@ contract SwapEthWrapper {
IERC20(pooledTokens[tokenIndexTo]).safeTransfer(msg.sender, dy);
} else {
IWETH9(weth).withdraw(dy);
// slither-disable-next-line arbitrary-send
(bool success, ) = msg.sender.call{value: dy}("");
require(success, "ETH_TRANSFER_FAILED");
}
Expand All @@ -285,6 +289,7 @@ contract SwapEthWrapper {
}
IERC20 lpToken_ = IERC20(address(lpToken));
lpToken_.safeTransfer(msg.sender, lpToken_.balanceOf(address(this)));
// slither-disable-next-line arbitrary-send
(bool success, ) = msg.sender.call{value: address(this).balance}("");
require(success, "ETH_TRANSFER_FAILED");
}
Expand Down

0 comments on commit b2aa4e9

Please sign in to comment.