Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reentrant call #13

Open
nzarambaelisa opened this issue Feb 25, 2023 · 1 comment
Open

reentrant call #13

nzarambaelisa opened this issue Feb 25, 2023 · 1 comment

Comments

@nzarambaelisa
Copy link

nzarambaelisa commented Feb 25, 2023

No description provided.

@nzarambaelisa nzarambaelisa changed the title how to withdraw stakers funds conditional code Mar 5, 2023
@nzarambaelisa
Copy link
Author

nzarambaelisa commented Apr 24, 2023

// 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 nzarambaelisa changed the title conditional code reentrant call Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant