Skip to content

Instantly share code, notes, and snippets.

@KardanovIR
Created September 22, 2020 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KardanovIR/40f9b0fabb5eeb8bf98bb615525cae02 to your computer and use it in GitHub Desktop.
Save KardanovIR/40f9b0fabb5eeb8bf98bb615525cae02 to your computer and use it in GitHub Desktop.
modifier myModifier() {
//do something before the function calls
runningFunction = true;
_;
//do something after the function calls
runningFunction = false;
}
function coolFunction() public payable myModifier() {
// function body here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment