added feature availability info to documentation

pull/1908/head^2
Francisco Giordano 5 years ago
parent 76a1d7a3cd
commit 9113335cb3
  1. 2
      contracts/GSN/README.adoc
  2. 6
      contracts/math/SafeMath.sol
  3. 2
      contracts/payment/PullPayment.sol
  4. 2
      contracts/payment/escrow/Escrow.sol
  5. 4
      contracts/utils/Address.sol

@ -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].

@ -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);

@ -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);

@ -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];

@ -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");

Loading…
Cancel
Save