Created
February 2, 2023 11:42
-
-
Save bartubozkurt/0fad831a96cc0f0e769990bfebb6f21d 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
/* Bad */ | |
contract Bad{ | |
function fund_reached() public returns(bool){ | |
return this.balance == 100 ether; // strict equalities | |
} | |
} | |
/* Better */ | |
contract Good{ | |
function fund_reached() public returns(bool){ | |
return this.balance >= 100 ether; // not strict equalities | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment