Merge pull request #13631 from Dev-Doggo/patch-2

Clarify that a contract without `receive` can still receive Ether through payable function calls
This commit is contained in:
Kamil Śliwak 2022-11-08 17:04:19 +01:00 committed by GitHub
commit 3db7cb7060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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