defi-minimal icon indicating copy to clipboard operation
defi-minimal copied to clipboard

reentrant call

Open nzarambaelisa opened this issue 2 years ago • 1 comments

nzarambaelisa avatar Feb 25 '23 20:02 nzarambaelisa

// 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

nzarambaelisa avatar Apr 24 '23 08:04 nzarambaelisa