Skip to content

Instantly share code, notes, and snippets.

@maymax777
Last active February 11, 2022 11:45
Show Gist options
  • Save maymax777/384a4b7a0e8d079d7136c1fca2d7dd4c to your computer and use it in GitHub Desktop.
Save maymax777/384a4b7a0e8d079d7136c1fca2d7dd4c to your computer and use it in GitHub Desktop.
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