-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Open
Description
🧐 Motivation
Help slither understand read only reentrancy guards by implementing a modifier like nonReentrant
that does NOT modify the state, and just checks _reentrancyGuardEntered
.
Slither has a special case in it for analysing nonReentrant
but gives false positives on cross function reentrancies where view
functions read state that is modified after a reentrant call.
E.g. crytic/slither#735 (comment)
If there was a modifier that was compatible with view
functions then slither could understand this too.
📝 Details
Add a nonReentrantView
modifier that is a thin wrapper around _reentrancyGuardEntered()
e.g.
modifier nonReentrantView() {
if(_reentrancyGuardEntered()) {
revert ReentrancyGuardReentrantCall();
}
_;
}
eMarchenko
Metadata
Metadata
Assignees
Labels
No labels