-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: calls-loop
does not report the context of the loop
#1468
Comments
Are |
No, definitely no loops. But calls like that:
Could it be that this counts as "loop" because The second example with |
Here's another example that triggers this bug: function _cancel(uint256 streamId) internal override onlySenderOrRecipient(streamId) {
// beginning of function clipped
// ...
if (msg.sender == sender) {
if (recipient.code.length > 0) {
try ISablierV2LockupRecipient(recipient).onStreamCanceled({
streamId: streamId,
senderAmount: senderAmount,
recipientAmount: recipientAmount
}) { } catch { }
}
}
else {
if (sender.code.length > 0) {
try ISablierV2LockupSender(sender).onStreamCanceled({
streamId: streamId,
senderAmount: senderAmount,
recipientAmount: recipientAmount
}) { } catch { }
}
}
}
|
calls-loop
does not report the context of the loop
Describe the issue:
Slither reports "has external calls inside a loop" although the corresponding function only contains an
if
-statement.Code example to reproduce the issue:
Example 1:
Example 2:
Version:
0.8.3
Relevant log output:
The text was updated successfully, but these errors were encountered: