Last active
February 11, 2022 11:45
-
-
Save maymax777/384a4b7a0e8d079d7136c1fca2d7dd4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.10; | |
contract ReEntrancyGuard { | |
bool internal locked; | |
modifier noReentrant() { | |
require(!locked, "No re-entrancy"); | |
locked = true; | |
_; | |
locked = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment