Skip to content

Commit 3568600

Browse files
authored
Update SafeMath link
1 parent 84eada3 commit 3568600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

learn_evm/arithmetic-checks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ these features are absent in the EVM.
77
Consequently, these safeguards must be incorporated within the machine's constraints.
88

99
Starting with Solidity version 0.8.0 the compiler automatically includes over and underflow protection in all arithmetic operations.
10-
Prior to version 0.8.0, developers were required to implement these checks manually, often using a library known as [SafeMath](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol), originally developed by OpenZeppelin.
10+
Prior to version 0.8.0, developers were required to implement these checks manually, often using a library known as [SafeMath](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.2/contracts/utils/math/SafeMath.sol), originally developed by OpenZeppelin.
1111
The compiler incorporates arithmetic checks in a manner similar to SafeMath, through additional operations.
1212

1313
As the Solidity language has evolved, the compiler has generated increasingly optimized code for arithmetic checks. This trend is also observed in smart contract development in general, where highly optimized arithmetic code written in low-level assembly is becoming more common. However, there is still a lack of comprehensive resources explaining the nuances of how the EVM handles arithmetic for signed and unsigned integers of 256 bits and less.

0 commit comments

Comments
 (0)