Skip to content

Commit 26e2f2e

Browse files
fixup! Update docs
1 parent d48aea9 commit 26e2f2e

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

docs/contracts/functions.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,7 @@ will consume more gas than the 2300 gas stipend:
312312

313313
.. warning::
314314
``send()`` and ``transfer()`` are deprecated and scheduled for removal.
315-
See the section on :ref:`address` for more information.
316-
317-
While it is possible to recreate the functionality by explicitly setting the limit to the value of the stipend (2300 gas),
318-
this value no longer holds its original meaning due to changing opcode costs.
319-
It is recommended to use different means to protect against reentrancy.
315+
See the section on :ref:`send <send-address-member>` and :ref:`transfer <balance-transfer-address-members>` for more information.
320316

321317
.. warning::
322318
When Ether is sent directly to a contract (without a function call, i.e. sender uses ``send`` or ``transfer``)

docs/types/value-types.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ Members of Addresses
242242

243243
For a quick reference of all members of address, see :ref:`address_related`.
244244

245+
.. _balance-transfer-address-members:
246+
245247
* ``balance`` and ``transfer``
246248

247249
It is possible to query the balance of an address using the property ``balance``
@@ -266,9 +268,15 @@ For a quick reference of all members of address, see :ref:`address_related`.
266268
Simple ether transfers can still be performed using the :ref:`call function <address_call_functions>`
267269
with with an optionally provided maximum amount of gas and empty payload, i.e., ``call{value: <amount>}("")``.
268270
By default this forwards all the remaining gas, subject to additional limits imposed by some EVM versions
269-
(such as the `63/64th rule <https://eips.ethereum.org/EIPS/eip-150>`__ introduced by ``tangerineWhistle``).
271+
(such as the `63/64th rule <https://eips.ethereum.org/EIPS/eip-150>`_ introduced by ``tangerineWhistle``).
270272
As with any external call, the ``gas`` call option can be used to set a lower limit.
271273

274+
While it is possible to recreate the functionality by explicitly setting the limit to the value of the stipend (2300 gas),
275+
this value no longer holds its original meaning due to changing opcode costs.
276+
It is recommended to use different means to protect against reentrancy.
277+
278+
.. _send-address-member:
279+
272280
* ``send``
273281

274282
``send`` is the low-level counterpart of ``transfer``. If the execution fails, the current contract will not stop with an exception, but ``send`` will return ``false``.
@@ -284,9 +292,13 @@ For a quick reference of all members of address, see :ref:`address_related`.
284292
Simple ether transfers can still be performed using the :ref:`call function <address_call_functions>`
285293
with with an optionally provided maximum amount of gas and empty payload, i.e., ``call{value: <amount>}("")``.
286294
By default this forwards all the remaining gas, subject to additional limits imposed by some EVM versions
287-
(such as the `63/64th rule <https://eips.ethereum.org/EIPS/eip-150>`__ introduced by ``tangerineWhistle``).
295+
(such as the `63/64th rule <https://eips.ethereum.org/EIPS/eip-150>`_ introduced by ``tangerineWhistle``).
288296
As with any external call, the ``gas`` call option can be used to set a lower limit.
289297

298+
While it is possible to recreate the functionality by explicitly setting the limit to the value of the stipend (2300 gas),
299+
this value no longer holds its original meaning due to changing opcode costs.
300+
It is recommended to use different means to protect against reentrancy.
301+
290302
.. _address_call_functions:
291303

292304
* ``call``, ``delegatecall`` and ``staticcall``

docs/units-and-global-variables.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ Mathematical and Cryptographic Functions
252252

253253
Members of Address Types
254254
------------------------
255+
These members are explained in more detail in the section on :ref:`members of address <members-of-addresses>`
255256

256257
``<address>.balance`` (``uint256``)
257258
balance of the :ref:`address` in Wei
@@ -270,7 +271,7 @@ Members of Address Types
270271

271272
.. warning::
272273
``send()`` and ``transfer()`` are deprecated and scheduled for removal.
273-
See the section on :ref:`address` for more information.
274+
See the section on :ref:`send <send-address-member>` and :ref:`transfer <balance-transfer-address-members>` for more information.
274275

275276
``<address>.call(bytes memory) returns (bool, bytes memory)``
276277
issue low-level ``CALL`` with the given payload, returns success condition and return data,

0 commit comments

Comments
 (0)