defi-minimal
defi-minimal copied to clipboard
reentrant call
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract Storage is ReentrancyGuard {
function store() external nonReentrant {
ret();
}
function ret() public nonReentrant{
}
} how do you solve problem of reentrant call caused by public nonreentrant function called inside an external nonreentrant function? like the code above