Browse Source

added feature availability info to documentation

(cherry picked from commit 9113335cb3b657d9c99ca1ac8feaf67d4f6f08c9)
Francisco Giordano 6 years ago
parent
commit
feaf051fef

+ 2 - 0
contracts/GSN/README.adoc

@@ -1,5 +1,7 @@
 = Gas Station Network (GSN)
 
+_Available since v2.4.0._
+
 This set of contracts provide all the tools required to make a contract callable via the https://gsn.openzeppelin.com[Gas Station Network].
 
 TIP: If you're new to the GSN, head over to our xref:openzeppelin::gsn/what-is-the-gsn.adoc[overview of the system] and basic guide to xref:ROOT:gsn.adoc[creating a GSN-capable contract].

+ 6 - 0
contracts/math/SafeMath.sol

@@ -54,6 +54,8 @@ library SafeMath {
      *
      * NOTE: This is a feature of the next version of OpenZeppelin Contracts.
      * @dev Get it via `npm install @openzeppelin/contracts@next`.
+     *
+     * _Available since v2.4.0._
      */
     function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         require(b <= a, errorMessage);
@@ -113,6 +115,8 @@ library SafeMath {
 
      * NOTE: This is a feature of the next version of OpenZeppelin Contracts.
      * @dev Get it via `npm install @openzeppelin/contracts@next`.
+     *
+     * _Available since v2.4.0._
      */
     function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         // Solidity only automatically asserts when dividing by 0
@@ -151,6 +155,8 @@ library SafeMath {
      *
      * NOTE: This is a feature of the next version of OpenZeppelin Contracts.
      * @dev Get it via `npm install @openzeppelin/contracts@next`.
+     *
+     * _Available since v2.4.0._
      */
     function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         require(b != 0, errorMessage);

+ 2 - 0
contracts/payment/PullPayment.sol

@@ -48,6 +48,8 @@ contract PullPayment {
      * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
      * Make sure you trust the recipient, or are either following the
      * checks-effects-interactions pattern or using {ReentrancyGuard}.
+     *
+     * _Available since v2.4.0._
      */
     function withdrawPaymentsWithGas(address payable payee) external {
         _escrow.withdrawWithGas(payee);

+ 2 - 0
contracts/payment/escrow/Escrow.sol

@@ -68,6 +68,8 @@ contract Escrow is Secondary {
      * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
      * Make sure you trust the recipient, or are either following the
      * checks-effects-interactions pattern or using {ReentrancyGuard}.
+     *
+     * _Available since v2.4.0._
      */
     function withdrawWithGas(address payable payee) public onlyPrimary {
         uint256 payment = _deposits[payee];

+ 4 - 0
contracts/utils/Address.sol

@@ -36,6 +36,8 @@ library Address {
      *
      * NOTE: This is a feature of the next version of OpenZeppelin Contracts.
      * @dev Get it via `npm install @openzeppelin/contracts@next`.
+     *
+     * _Available since v2.4.0._
      */
     function toPayable(address account) internal pure returns (address payable) {
         return address(uint160(account));
@@ -56,6 +58,8 @@ library Address {
      * taken to not create reentrancy vulnerabilities. Consider using
      * {ReentrancyGuard} or the
      * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
+     *
+     * _Available since v2.4.0._
      */
     function sendValue(address payable recipient, uint256 amount) internal {
         require(address(this).balance >= amount, "Address: insufficient balance");