Skip to content

Latest commit

 

History

History
237 lines (222 loc) · 8.61 KB

ReentrancyGuard.md

File metadata and controls

237 lines (222 loc) · 8.61 KB

Helps contracts guard against reentrancy attacks. (ReentrancyGuard.sol)

View Source: contracts/openzeppelin/ReentrancyGuard.sol

↘ Derived Contracts: LoanTokenBase, State

ReentrancyGuard contract

If you mark a function nonReentrant, you should also mark it external.

Contract Members

Constants & Variables

uint256 internal constant REENTRANCY_GUARD_FREE;
uint256 internal constant REENTRANCY_GUARD_LOCKED;
uint256 internal reentrancyLock;

Modifiers

nonReentrant

Prevents a contract from calling itself, directly or indirectly. If you mark a function nonReentrant, you should also mark it external. Calling one nonReentrant function from another is not supported. Instead, you can implement a private function doing the actual work, and an external wrapper marked as nonReentrant.

modifier nonReentrant() internal

Functions

Contracts