BIFI icon indicating copy to clipboard operation
BIFI copied to clipboard

Update compiler versions, eliminate safeMath dependency, and refactor safeMath arithmetic in smart contracts

Open floor-licker opened this issue 1 year ago • 0 comments

This PR updates the Solidity compiler version to 0.8.0 for all smart contracts and refactors the contracts to remove the dependency on SafeMath.

Upgrade to Solidity v0.8.0

Solidity 0.8 introduces built-in overflow and underflow checks, which eliminate the need for external libraries like SafeMath. Solidity 0.8 also introduces gas optimizations for arithmetic operations, so this update both streamlines contract execution and lowers gas costs for end users. Solidity 0.8’s built-in overflow/underflow checks are also more robust and efficient compared to the SafeMath library.

SafeMath Removal

In updating to Solidity v0.8.0, the built-in safety features make the dependency on the safeMath library redundant. In doing this we remove the dependency on this external library

I appreciate feedback and am happy to assist with any further improvements or testing where required. Please don’t hesitate to reach out.

My Telegram and X accounts are both linked in my bio.

floor-licker avatar Dec 13 '24 20:12 floor-licker