solidity-security-blog icon indicating copy to clipboard operation
solidity-security-blog copied to clipboard

SafeMath not needed since Solidity 0.8.0?

Open aspiers opened this issue 4 years ago • 1 comments

https://docs.soliditylang.org/en/latest/080-breaking-changes.html says:

Arithmetic operations revert on underflow and overflow. You can use unchecked { ... } to use the previous wrapping behaviour.

However OpenZeppelin are keeping it for reasons explained here:

https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2465

It would be helpful to update this blog to reflect that.

aspiers avatar Apr 04 '21 10:04 aspiers

Yep, thanks for pointing this out. Its on our to-do list to update the entire list based on latest solidity.

AgeManning avatar Jun 30 '21 00:06 AgeManning