Skip to content

Commit 9dd2e0e

Browse files
author
Leo
authored
Merge pull request #12954 from aathan/clarify-address-literals-eip-55
Link to address literals from address value types
2 parents 681581d + ffbb6f1 commit 9dd2e0e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/types/value-types.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ an exception to this rule.
210210
declare its type as ``address payable`` to make this requirement visible. Also,
211211
try to make this distinction or conversion as early as possible.
212212

213+
The distinction between ``address`` and ``address payable`` was introduced with version 0.5.0.
214+
Also starting from that version, contracts are not implicitly convertible to the ``address`` type, but can still be explicitly converted to
215+
``address`` or to ``address payable``, if they have a receive or payable fallback function.
216+
217+
213218
Operators:
214219

215220
* ``<=``, ``<``, ``==``, ``!=``, ``>=`` and ``>``
@@ -223,9 +228,7 @@ Operators:
223228
or you can use ``address(uint160(uint256(b)))``, which results in ``0x777788889999AaAAbBbbCcccddDdeeeEfFFfCcCc``.
224229

225230
.. note::
226-
The distinction between ``address`` and ``address payable`` was introduced with version 0.5.0.
227-
Also starting from that version, contracts do not derive from the address type, but can still be explicitly converted to
228-
``address`` or to ``address payable``, if they have a receive or payable fallback function.
231+
Mixed-case hexadecimal numbers conforming to `EIP-55 <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md>`_ are automatically treated as literals of the ``address`` type. See :ref:`Address Literals<address_literals>`.
229232

230233
.. _members-of-addresses:
231234

0 commit comments

Comments
 (0)