codex-storage / codex-contracts-eth

Ethereum smart contracts for Codex
Other
5 stars 9 forks source link

Use OpenZeppelin's `SafeMath` #50

Closed AuHau closed 1 year ago

AuHau commented 1 year ago

This would prevent all the potential overflow scenario and potentially other bugs:

https://docs.openzeppelin.com/contracts/3.x/api/math

markspanbroek commented 1 year ago

As far as I know, this is not necessary because we're using Solidity 0.8.x, which has overflow and underflow protection by default: https://docs.soliditylang.org/en/latest/080-breaking-changes.html

AuHau commented 1 year ago

Oh sweet! Did not know that was part of it now :-) Yeah makes sense :-) Closing it then.