From 02a6b05bde8172e2ba21746a173f4db3dcbcfc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Venturo?= Date: Fri, 12 Jun 2020 13:22:52 -0300 Subject: [PATCH] Update functionCall docs (cherry picked from commit 242400e9ea73b2ca173bee27aa6b9f24b7d1305e) --- contracts/utils/Address.sol | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/contracts/utils/Address.sol b/contracts/utils/Address.sol index cf445ccf7..1d952cc07 100644 --- a/contracts/utils/Address.sol +++ b/contracts/utils/Address.sol @@ -66,6 +66,9 @@ library Address { * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * * Requirements: * * - `target` must be a contract. @@ -88,18 +91,13 @@ library Address { } /** - * @dev Performs a Solidity function call using a low level `call`, - * transferring `value` wei. A plain`call` is an unsafe replacement for a - * function call: use this function instead. - * - * If `target` reverts with a revert reason, it is bubbled up by this - * function (like regular Solidity function calls). + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. * * Requirements: * - * - `target` must be a contract. * - the calling contract must have an ETH balance of at least `value`. - * - calling `target` with `data` must not revert. + * - the called Solidity function must be `payable`. * * _Available since v3.1._ */