is openzeppelin safemath no longer needer in solidity version greater than 8?

Viewed 201

I am trying to import safemath from openzeppelin in solidity version greater than 8 but i am getting errors in the import, when i checked online it was mentioned that safemath is not required in solidity version greater than 8 sodoes that mean that we can simply do mathematical operations and solidity will handle errors automatically like zero division, negative balance etc.

1 Answers

yes, you can simply do the math operation you need, safemath is no longer needed in version above 0.8.0, now you will get reverts by underflow and overflow

Related