-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary SafeMath calls #1552
Comments
Hm, we've usually been more of the "use safemath everywhere to be sure" camp. I think we should tackle this by using something like the |
That sounds like a great idea! I run some preliminary tests and the concept seems to work. |
I think we can add |
But My proposal is that since the |
We haven't yet found a use case for |
Its usage has become ubiquitous, but there are multiple instances where it is not needed. E.g. in
ERC721
:That is the only place where
_ownedTokensCount[to]
is incremented: 2^256 calls to_mint
are needed to make it overflow, making these calls more expensive by adding the check makes no sense.The text was updated successfully, but these errors were encountered: