Merge pull request #12232 from Josel95/docs-address-type

fixed example address payable
This commit is contained in:
chriseth 2021-11-04 10:46:13 +01:00 committed by GitHub
commit 735550b734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,7 +241,7 @@ and to send Ether (in units of wei) to a payable address using the ``transfer``
.. code-block:: solidity .. code-block:: solidity
:force: :force:
address payable x = address(0x123); address payable x = payable(0x123);
address myAddress = address(this); address myAddress = address(this);
if (x.balance < 10 && myAddress.balance >= 10) x.transfer(10); if (x.balance < 10 && myAddress.balance >= 10) x.transfer(10);