Pārlūkot izejas kodu

add note in api ref about unreleased features

Francisco Giordano 6 gadi atpakaļ
vecāks
revīzija
9fdc91758d
2 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  1. 9 0
      contracts/math/SafeMath.sol
  2. 3 0
      contracts/utils/Address.sol

+ 9 - 0
contracts/math/SafeMath.sol

@@ -51,6 +51,9 @@ library SafeMath {
      *
      * Requirements:
      * - Subtraction cannot overflow.
+     *
+     * NOTE: This is a feature of the next version of OpenZeppelin Contracts.
+     * @dev Get it via `npm install @openzeppelin/contracts@next`.
      */
     function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         require(b <= a, errorMessage);
@@ -107,6 +110,9 @@ library SafeMath {
      *
      * Requirements:
      * - The divisor cannot be zero.
+
+     * NOTE: This is a feature of the next version of OpenZeppelin Contracts.
+     * @dev Get it via `npm install @openzeppelin/contracts@next`.
      */
     function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         // Solidity only automatically asserts when dividing by 0
@@ -142,6 +148,9 @@ library SafeMath {
      *
      * Requirements:
      * - The divisor cannot be zero.
+     *
+     * NOTE: This is a feature of the next version of OpenZeppelin Contracts.
+     * @dev Get it via `npm install @openzeppelin/contracts@next`.
      */
     function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         require(b != 0, errorMessage);

+ 3 - 0
contracts/utils/Address.sol

@@ -33,6 +33,9 @@ library Address {
     /**
      * @dev Converts an `address` into `address payable`. Note that this is
      * simply a type cast: the actual underlying value is not changed.
+     *
+     * NOTE: This is a feature of the next version of OpenZeppelin Contracts.
+     * @dev Get it via `npm install @openzeppelin/contracts@next`.
      */
     function toPayable(address account) internal pure returns (address payable) {
         return address(uint160(account));