A contract that provides modifiers to prevent reentrancy to state-changing and view-only methods. This contract is inspired by https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol and https://github.com/balancer-labs/balancer-core/blob/master/contracts/BPool.sol.
Prevents a contract from calling itself, directly or indirectly.
nonReentrant function from another
function is not supported. It is possible to prevent this from happening
by making the
nonReentrant function external, and make it call a
private function that does the actual work.
Designed to prevent a view-only method from being re-entered during a call to a
nonReentrant() state-changing method.