File tree 5 files changed +16
-0
lines changed 5 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1
1
= Gas Station Network (GSN)
2
2
3
+ _Available since v2.4.0._
4
+
3
5
This set of contracts provide all the tools required to make a contract callable via the https://gsn.openzeppelin.com[Gas Station Network].
4
6
5
7
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].
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ library SafeMath {
54
54
*
55
55
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
56
56
* @dev Get it via `npm install @openzeppelin/contracts@next`.
57
+ *
58
+ * _Available since v2.4.0._
57
59
*/
58
60
function sub (uint256 a , uint256 b , string memory errorMessage ) internal pure returns (uint256 ) {
59
61
require (b <= a, errorMessage);
@@ -113,6 +115,8 @@ library SafeMath {
113
115
114
116
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
115
117
* @dev Get it via `npm install @openzeppelin/contracts@next`.
118
+ *
119
+ * _Available since v2.4.0._
116
120
*/
117
121
function div (uint256 a , uint256 b , string memory errorMessage ) internal pure returns (uint256 ) {
118
122
// Solidity only automatically asserts when dividing by 0
@@ -151,6 +155,8 @@ library SafeMath {
151
155
*
152
156
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
153
157
* @dev Get it via `npm install @openzeppelin/contracts@next`.
158
+ *
159
+ * _Available since v2.4.0._
154
160
*/
155
161
function mod (uint256 a , uint256 b , string memory errorMessage ) internal pure returns (uint256 ) {
156
162
require (b != 0 , errorMessage);
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ contract PullPayment {
48
48
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
49
49
* Make sure you trust the recipient, or are either following the
50
50
* checks-effects-interactions pattern or using {ReentrancyGuard}.
51
+ *
52
+ * _Available since v2.4.0._
51
53
*/
52
54
function withdrawPaymentsWithGas (address payable payee ) external {
53
55
_escrow.withdrawWithGas (payee);
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ contract Escrow is Secondary {
68
68
* WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
69
69
* Make sure you trust the recipient, or are either following the
70
70
* checks-effects-interactions pattern or using {ReentrancyGuard}.
71
+ *
72
+ * _Available since v2.4.0._
71
73
*/
72
74
function withdrawWithGas (address payable payee ) public onlyPrimary {
73
75
uint256 payment = _deposits[payee];
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ library Address {
36
36
*
37
37
* NOTE: This is a feature of the next version of OpenZeppelin Contracts.
38
38
* @dev Get it via `npm install @openzeppelin/contracts@next`.
39
+ *
40
+ * _Available since v2.4.0._
39
41
*/
40
42
function toPayable (address account ) internal pure returns (address payable ) {
41
43
return address (uint160 (account));
@@ -56,6 +58,8 @@ library Address {
56
58
* taken to not create reentrancy vulnerabilities. Consider using
57
59
* {ReentrancyGuard} or the
58
60
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
61
+ *
62
+ * _Available since v2.4.0._
59
63
*/
60
64
function sendValue (address payable recipient , uint256 amount ) internal {
61
65
require (address (this ).balance >= amount, "Address: insufficient balance " );
You can’t perform that action at this time.
0 commit comments