Skip to content

Commit 9312ffa

Browse files
committed
NatSpec
1 parent 7732a38 commit 9312ffa

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

contracts/utils/ReentrancyGuard.sol

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ abstract contract ReentrancyGuard {
6262
}
6363

6464
/**
65-
* @dev View variant of the `nonReentrant` modifier. Can be used to prevent view functions from being called
66-
* while the internal state of the contract is inconsistent and invariants do not hold.
65+
* @dev A `view` only version of {nonReentrant}. Use to block view functions
66+
* from being called, preventing reading from inconsistent contract state.
6767
*
68-
* This being a "view" version of the modifier, it will not set the reentrancy status. This modifier should only
69-
* be used in view functions. Payable and non-payable function should use the standard "nonReentrant" modifier.
68+
* CAUTION: This is a "view" modifier and does not change the reentrancy
69+
* status. Use it only on view functions. For payable or non-payable functions,
70+
* use the standard {nonReentrant} modifier instead.
7071
*/
7172
modifier nonReentrantView() {
7273
_nonReentrantBeforeView();

contracts/utils/ReentrancyGuardTransient.sol

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ abstract contract ReentrancyGuardTransient {
3838
}
3939

4040
/**
41-
* @dev View variant of the `nonReentrant` modifier. Can be used to prevent view functions from being called
42-
* while the internal state of the contract is inconsistent and invariants do not hold.
41+
* @dev A `view` only version of {nonReentrant}. Use to block view functions
42+
* from being called, preventing reading from inconsistent contract state.
4343
*
44-
* This being a "view" version of the modifier, it will not set the reentrancy status. This modifier should only
45-
* be used in view functions. Payable and non-payable function should use the standard "nonReentrant" modifier.
44+
* CAUTION: This is a "view" modifier and does not change the reentrancy
45+
* status. Use it only on view functions. For payable or non-payable functions,
46+
* use the standard {nonReentrant} modifier instead.
4647
*/
4748
modifier nonReentrantView() {
4849
_nonReentrantBeforeView();

0 commit comments

Comments
 (0)