ReentrancyGuard ​
ReentrancyGuard based on OpenZeppelin implementation. https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.8/contracts/security/ReentrancyGuard.sol
State Variables ​
REENTRANCY_NOT_ENTERED ​
solidity
uint8 internal constant REENTRANCY_NOT_ENTERED = 1;
REENTRANCY_ENTERED ​
solidity
uint8 internal constant REENTRANCY_ENTERED = 2;
Functions ​
constructor ​
solidity
constructor();
_checkReentrancy ​
checks that no reentrancy occurs, reverts if so. Calling the method in the modifier reduces bytecode size as modifiers are inlined into bytecode
solidity
function _checkReentrancy() internal;
nonReentrant ​
Prevents a contract from calling itself, directly or indirectly. See OpenZeppelin implementation for more info
solidity
modifier nonReentrant();