mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update functions.rst
This commit is contained in:
parent
559174054f
commit
43ff61f185
@ -317,12 +317,13 @@ will consume more gas than the 2300 gas stipend:
|
|||||||
- Sending Ether
|
- Sending Ether
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Contracts that receive Ether directly (without a function call, i.e. using ``send`` or ``transfer``)
|
When Ether is sent directly to a contract (without a function call, i.e. sender uses ``send`` or ``transfer``)
|
||||||
but do not define a receive Ether function or a payable fallback function
|
but the receiving contract does not define a receive Ether function or a payable fallback function,
|
||||||
throw an exception, sending back the Ether (this was different
|
an exception will be thrown, sending back the Ether (this was different
|
||||||
before Solidity v0.4.0). So if you want your contract to receive Ether,
|
before Solidity v0.4.0). If you want your contract to receive Ether,
|
||||||
you have to implement a receive Ether function (using payable fallback functions for receiving Ether is
|
you have to implement a receive Ether function (using payable fallback functions for receiving Ether is
|
||||||
not recommended, since it would not fail on interface confusions).
|
not recommended, since the fallback is invoked and would not fail for interface confusions
|
||||||
|
on the part of the sender).
|
||||||
|
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
Loading…
Reference in New Issue
Block a user