mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove obsolete .send() entry from FAQ
This commit is contained in:
parent
cde027d144
commit
59514d8268
@ -660,16 +660,6 @@ https://github.com/ethereum/wiki/wiki/Subtleties
|
||||
After a successful CREATE operation's sub-execution, if the operation returns x, 5 * len(x) gas is subtracted from the remaining gas before the contract is created. If the remaining gas is less than 5 * len(x), then no gas is subtracted, the code of the created contract becomes the empty string, but this is not treated as an exceptional condition - no reverts happen.
|
||||
|
||||
|
||||
How do I use ``.send()``?
|
||||
=========================
|
||||
|
||||
If you want to send 20 Ether from a contract to the address ``x``, you use ``x.send(20 ether);``.
|
||||
Here, ``x`` can be a plain address or a contract. If the contract already explicitly defines
|
||||
a function ``send`` (and thus overwrites the special function), you can use ``address(x).send(20 ether);``.
|
||||
|
||||
Note that the call to ``send`` may fail in certain conditions, such as if you have insufficient funds, so you should always check the return value.
|
||||
``send`` returns ``true`` if the send was successful and ``false`` otherwise.
|
||||
|
||||
What does the following strange check do in the Custom Token contract?
|
||||
======================================================================
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user