Преглед изворни кода

add note suggesting reentrancy post (#2059)

Francisco Giordano пре 5 година
родитељ
комит
06983a2075
2 измењених фајлова са 8 додато и 0 уклоњено
  1. 4 0
      contracts/payment/PullPayment.sol
  2. 4 0
      contracts/utils/ReentrancyGuard.sol

+ 4 - 0
contracts/payment/PullPayment.sol

@@ -12,6 +12,10 @@ import "./escrow/Escrow.sol";
  * Ether, security-wise. It prevents recipients from blocking execution, and
  * eliminates reentrancy concerns.
  *
+ * TIP: If you would like to learn more about reentrancy and alternative ways
+ * to protect against it, check out our blog post
+ * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
+ *
  * To use, derive from the `PullPayment` contract, and use {_asyncTransfer}
  * instead of Solidity's `transfer` function. Payees can query their due
  * payments with {payments}, and retrieve them with {withdrawPayments}.

+ 4 - 0
contracts/utils/ReentrancyGuard.sol

@@ -12,6 +12,10 @@ pragma solidity ^0.5.0;
  * those functions `private`, and then adding `external` `nonReentrant` entry
  * points to them.
  *
+ * TIP: If you would like to learn more about reentrancy and alternative ways
+ * to protect against it, check out our blog post
+ * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
+ *
  * _Since v2.5.0:_ this module is now much more gas efficient, given net gas
  * metering changes introduced in the Istanbul hardfork.
  */