mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update receive function documentation
The receive function documentation is slightly inaccurate currently, as a contract can still receive Ether through payable functions even if no receive or payable fallback function is present.
This commit is contained in:
parent
ce18dddd20
commit
b787c32233
@ -297,7 +297,7 @@ on plain Ether transfers (e.g. via ``.send()`` or ``.transfer()``). If no such
|
||||
function exists, but a payable :ref:`fallback function <fallback-function>`
|
||||
exists, the fallback function will be called on a plain Ether transfer. If
|
||||
neither a receive Ether nor a payable fallback function is present, the
|
||||
contract cannot receive Ether through regular transactions and throws an
|
||||
contract cannot receive Ether through a transaction that does not represent a payable function call and throws an
|
||||
exception.
|
||||
|
||||
In the worst case, the ``receive`` function can only rely on 2300 gas being
|
||||
|
Loading…
Reference in New Issue
Block a user