|
@@ -5,9 +5,9 @@ pragma solidity ^0.5.0;
|
|
|
* @dev Wrappers over Solidity's uintXX casting operators with added overflow
|
|
|
* checks.
|
|
|
*
|
|
|
- * Downcasting from uint256 in Solidity does not revert on overflow. This can
|
|
|
+ * Downcasting from uint256 in Solidity does not revert on overflow. This can
|
|
|
* easily result in undesired exploitation or bugs, since developers usually
|
|
|
- * assume that overflows raise errors. `SafeCast` restores this intuition by
|
|
|
+ * assume that overflows raise errors. `SafeCast` restores this intuition by
|
|
|
* reverting the transaction when such an operation overflows.
|
|
|
*
|
|
|
* Using this library instead of the unchecked operations eliminates an entire
|
|
@@ -15,6 +15,8 @@ pragma solidity ^0.5.0;
|
|
|
*
|
|
|
* Can be combined with {SafeMath} to extend it to smaller types, by performing
|
|
|
* all math on `uint256` and then downcasting.
|
|
|
+ *
|
|
|
+ * _Available since v2.5.0._
|
|
|
*/
|
|
|
library SafeCast {
|
|
|
|