Fix SafeMath docs
This commit is contained in:
@ -23,6 +23,7 @@ library SafeMath {
|
|||||||
* Counterpart to Solidity's `+` operator.
|
* Counterpart to Solidity's `+` operator.
|
||||||
*
|
*
|
||||||
* Requirements:
|
* Requirements:
|
||||||
|
*
|
||||||
* - Addition cannot overflow.
|
* - Addition cannot overflow.
|
||||||
*/
|
*/
|
||||||
function add(uint256 a, uint256 b) internal pure returns (uint256) {
|
function add(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||||
@ -39,6 +40,7 @@ library SafeMath {
|
|||||||
* Counterpart to Solidity's `-` operator.
|
* Counterpart to Solidity's `-` operator.
|
||||||
*
|
*
|
||||||
* Requirements:
|
* Requirements:
|
||||||
|
*
|
||||||
* - Subtraction cannot overflow.
|
* - Subtraction cannot overflow.
|
||||||
*/
|
*/
|
||||||
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
|
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||||
@ -52,6 +54,7 @@ library SafeMath {
|
|||||||
* Counterpart to Solidity's `-` operator.
|
* Counterpart to Solidity's `-` operator.
|
||||||
*
|
*
|
||||||
* Requirements:
|
* Requirements:
|
||||||
|
*
|
||||||
* - Subtraction cannot overflow.
|
* - Subtraction cannot overflow.
|
||||||
*/
|
*/
|
||||||
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
||||||
@ -68,6 +71,7 @@ library SafeMath {
|
|||||||
* Counterpart to Solidity's `*` operator.
|
* Counterpart to Solidity's `*` operator.
|
||||||
*
|
*
|
||||||
* Requirements:
|
* Requirements:
|
||||||
|
*
|
||||||
* - Multiplication cannot overflow.
|
* - Multiplication cannot overflow.
|
||||||
*/
|
*/
|
||||||
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
|
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||||
@ -93,6 +97,7 @@ library SafeMath {
|
|||||||
* uses an invalid opcode to revert (consuming all remaining gas).
|
* uses an invalid opcode to revert (consuming all remaining gas).
|
||||||
*
|
*
|
||||||
* Requirements:
|
* Requirements:
|
||||||
|
*
|
||||||
* - The divisor cannot be zero.
|
* - The divisor cannot be zero.
|
||||||
*/
|
*/
|
||||||
function div(uint256 a, uint256 b) internal pure returns (uint256) {
|
function div(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||||
@ -108,6 +113,7 @@ library SafeMath {
|
|||||||
* uses an invalid opcode to revert (consuming all remaining gas).
|
* uses an invalid opcode to revert (consuming all remaining gas).
|
||||||
*
|
*
|
||||||
* Requirements:
|
* Requirements:
|
||||||
|
*
|
||||||
* - The divisor cannot be zero.
|
* - The divisor cannot be zero.
|
||||||
*/
|
*/
|
||||||
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
||||||
@ -127,6 +133,7 @@ library SafeMath {
|
|||||||
* invalid opcode to revert (consuming all remaining gas).
|
* invalid opcode to revert (consuming all remaining gas).
|
||||||
*
|
*
|
||||||
* Requirements:
|
* Requirements:
|
||||||
|
*
|
||||||
* - The divisor cannot be zero.
|
* - The divisor cannot be zero.
|
||||||
*/
|
*/
|
||||||
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
|
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||||
@ -142,6 +149,7 @@ library SafeMath {
|
|||||||
* invalid opcode to revert (consuming all remaining gas).
|
* invalid opcode to revert (consuming all remaining gas).
|
||||||
*
|
*
|
||||||
* Requirements:
|
* Requirements:
|
||||||
|
*
|
||||||
* - The divisor cannot be zero.
|
* - The divisor cannot be zero.
|
||||||
*/
|
*/
|
||||||
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
||||||
|
|||||||
Reference in New Issue
Block a user