added feature availability info to documentation
This commit is contained in:
@ -1,5 +1,7 @@
|
|||||||
= Gas Station Network (GSN)
|
= 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].
|
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].
|
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.
|
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
|
||||||
* @dev Get it via `npm install @openzeppelin/contracts@next`.
|
* @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) {
|
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
||||||
require(b <= a, errorMessage);
|
require(b <= a, errorMessage);
|
||||||
@ -113,6 +115,8 @@ library SafeMath {
|
|||||||
|
|
||||||
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
|
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
|
||||||
* @dev Get it via `npm install @openzeppelin/contracts@next`.
|
* @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) {
|
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
||||||
// Solidity only automatically asserts when dividing by 0
|
// 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.
|
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
|
||||||
* @dev Get it via `npm install @openzeppelin/contracts@next`.
|
* @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) {
|
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
|
||||||
require(b != 0, errorMessage);
|
require(b != 0, errorMessage);
|
||||||
|
|||||||
@ -48,6 +48,8 @@ contract PullPayment {
|
|||||||
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
|
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
|
||||||
* Make sure you trust the recipient, or are either following the
|
* Make sure you trust the recipient, or are either following the
|
||||||
* checks-effects-interactions pattern or using {ReentrancyGuard}.
|
* checks-effects-interactions pattern or using {ReentrancyGuard}.
|
||||||
|
*
|
||||||
|
* _Available since v2.4.0._
|
||||||
*/
|
*/
|
||||||
function withdrawPaymentsWithGas(address payable payee) external {
|
function withdrawPaymentsWithGas(address payable payee) external {
|
||||||
_escrow.withdrawWithGas(payee);
|
_escrow.withdrawWithGas(payee);
|
||||||
|
|||||||
@ -68,6 +68,8 @@ contract Escrow is Secondary {
|
|||||||
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
|
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
|
||||||
* Make sure you trust the recipient, or are either following the
|
* Make sure you trust the recipient, or are either following the
|
||||||
* checks-effects-interactions pattern or using {ReentrancyGuard}.
|
* checks-effects-interactions pattern or using {ReentrancyGuard}.
|
||||||
|
*
|
||||||
|
* _Available since v2.4.0._
|
||||||
*/
|
*/
|
||||||
function withdrawWithGas(address payable payee) public onlyPrimary {
|
function withdrawWithGas(address payable payee) public onlyPrimary {
|
||||||
uint256 payment = _deposits[payee];
|
uint256 payment = _deposits[payee];
|
||||||
|
|||||||
@ -36,6 +36,8 @@ library Address {
|
|||||||
*
|
*
|
||||||
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
|
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
|
||||||
* @dev Get it via `npm install @openzeppelin/contracts@next`.
|
* @dev Get it via `npm install @openzeppelin/contracts@next`.
|
||||||
|
*
|
||||||
|
* _Available since v2.4.0._
|
||||||
*/
|
*/
|
||||||
function toPayable(address account) internal pure returns (address payable) {
|
function toPayable(address account) internal pure returns (address payable) {
|
||||||
return address(uint160(account));
|
return address(uint160(account));
|
||||||
@ -56,6 +58,8 @@ library Address {
|
|||||||
* taken to not create reentrancy vulnerabilities. Consider using
|
* taken to not create reentrancy vulnerabilities. Consider using
|
||||||
* {ReentrancyGuard} or the
|
* {ReentrancyGuard} or the
|
||||||
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
|
* 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 {
|
function sendValue(address payable recipient, uint256 amount) internal {
|
||||||
require(address(this).balance >= amount, "Address: insufficient balance");
|
require(address(this).balance >= amount, "Address: insufficient balance");
|
||||||
|
|||||||
Reference in New Issue
Block a user