mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Document all address methods in the global variables section
This commit is contained in:
parent
0157b86ce6
commit
18a37ed799
@ -128,17 +128,23 @@ Address Related
|
|||||||
|
|
||||||
``<address>.balance`` (``uint256``):
|
``<address>.balance`` (``uint256``):
|
||||||
balance of the :ref:`address` in Wei
|
balance of the :ref:`address` in Wei
|
||||||
``<address>.send(uint256 amount) returns (bool)``:
|
|
||||||
send given amount of Wei to :ref:`address`, returns ``false`` on failure
|
|
||||||
``<address>.transfer(uint256 amount)``:
|
``<address>.transfer(uint256 amount)``:
|
||||||
send given amount of Wei to :ref:`address`, throws on failure
|
send given amount of Wei to :ref:`address`, throws on failure
|
||||||
|
``<address>.send(uint256 amount) returns (bool)``:
|
||||||
|
send given amount of Wei to :ref:`address`, returns ``false`` on failure
|
||||||
|
``<address>.call(...) returns (bool)``:
|
||||||
|
issue low-level ``CALL``, returns ``false`` on failure
|
||||||
|
``<address>.callcode(...) returns (bool)``:
|
||||||
|
issue low-level ``CALLCODE``, returns ``false`` on failure
|
||||||
|
``<address>.delegatecall(...) returns (bool)``:
|
||||||
|
issue low-level ``DELEGATECALL``, returns ``false`` on failure
|
||||||
|
|
||||||
For more information, see the section on :ref:`address`.
|
For more information, see the section on :ref:`address`.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
There are some dangers in using ``send``: The transfer fails if the call stack depth is at 1024
|
There are some dangers in using ``send``: The transfer fails if the call stack depth is at 1024
|
||||||
(this can always be forced by the caller) and it also fails if the recipient runs out of gas. So in order
|
(this can always be forced by the caller) and it also fails if the recipient runs out of gas. So in order
|
||||||
to make safe Ether transfers, always check the return value of ``send`` or even better:
|
to make safe Ether transfers, always check the return value of ``send``, use ``transfer`` or even better:
|
||||||
Use a pattern where the recipient withdraws the money.
|
Use a pattern where the recipient withdraws the money.
|
||||||
|
|
||||||
.. index:: this, selfdestruct
|
.. index:: this, selfdestruct
|
||||||
|
Loading…
Reference in New Issue
Block a user