Last active
February 1, 2023 16:58
-
-
Save bartubozkurt/abbb3b6503ef0eb8770047174936e081 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* Bad */ | |
modifier myModif(){ | |
if(..){ | |
_; | |
} | |
} | |
function get() myModif returns(uint){} | |
/* Better */ | |
modidfier myModif(){ | |
if(..){ | |
_; | |
} else { | |
revert("ERROR"); // or _; | |
} | |
} | |
function get() myModif returns(uint){} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment