You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The solidity version of the contract is 0.8.10.
Since Solidity 0.8, the overflow/underflow check is implemented on the language level, it doesn't need the use of SafeMath library. The code is doing some calculations and performing the same validations twice (one on the language level and one in the library).
I suggest removing the import of SafeMath, the using and replace the math operations sub, mul and div by -, * and / accordingly.
The solidity version of the contract is 0.8.10.
Since Solidity 0.8, the overflow/underflow check is implemented on the language level, it doesn't need the use of SafeMath library. The code is doing some calculations and performing the same validations twice (one on the language level and one in the library).
I suggest removing the import of
SafeMath
, theusing
and replace the math operationssub
,mul
anddiv
by-
,*
and/
accordingly.Gas comparison here: https://gist.github.com/miguelmtzinf/180e25788b0ea60eb84785717ecb4c7e
Good save of 1k gas avg in
redeemToken
, minor gas save insupplyTokenTo
and 10k in deployment.The text was updated successfully, but these errors were encountered: