Skip to content

Commit a1df27a

Browse files
author
Chris Ward
committed
Merge payable FAQ item
1 parent 606c2b9 commit a1df27a

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

docs/contracts/functions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ functions match the given function identifier (or if no data was supplied at
236236
all).
237237

238238
Furthermore, this function is executed whenever the contract receives plain
239-
Ether (without data). Additionally, in order to receive Ether, the fallback function
239+
Ether (without data). To receive Ether and add it to the total balance of the contract, the fallback function
240240
must be marked ``payable``. If no such function exists, the contract cannot receive
241-
Ether through regular transactions.
241+
Ether through regular transactions and throws an exception.
242242

243243
In the worst case, the fallback function can only rely on 2300 gas being
244244
available (for example when `send` or `transfer` is used), leaving little

docs/frequently-asked-questions.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ Yes, you can use ``abi.encodePacked``::
5454
}
5555
}
5656

57-
What happens if you send ether along with a function call to a contract?
58-
========================================================================
59-
60-
It gets added to the total balance of the contract, just like when you send ether when creating a contract.
61-
You can only send ether along to a function that has the ``payable`` modifier,
62-
otherwise an exception is thrown.
63-
6457
******************
6558
Advanced Questions
6659
******************

0 commit comments

Comments
 (0)