aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2019-01-21 21:56:50 +0800
committerGitHub <noreply@github.com>2019-01-21 21:56:50 +0800
commit8f694d5119dad14ca1bce4201f9ccc617e206774 (patch)
tree251184ef643adee02f925b4786b15b899fdcfa9a /docs
parentec6b6602517ba12d9b3c296515d411cc486a6b42 (diff)
parenta1df27ae3d65d22e69c1bf6b812e69d3d92a28cc (diff)
downloaddexon-solidity-8f694d5119dad14ca1bce4201f9ccc617e206774.tar
dexon-solidity-8f694d5119dad14ca1bce4201f9ccc617e206774.tar.gz
dexon-solidity-8f694d5119dad14ca1bce4201f9ccc617e206774.tar.bz2
dexon-solidity-8f694d5119dad14ca1bce4201f9ccc617e206774.tar.lz
dexon-solidity-8f694d5119dad14ca1bce4201f9ccc617e206774.tar.xz
dexon-solidity-8f694d5119dad14ca1bce4201f9ccc617e206774.tar.zst
dexon-solidity-8f694d5119dad14ca1bce4201f9ccc617e206774.zip
Merge pull request #5796 from ethereum/faq-send-payable
[DOCS] Merge payable FAQ item
Diffstat (limited to 'docs')
-rw-r--r--docs/contracts/functions.rst4
-rw-r--r--docs/frequently-asked-questions.rst7
2 files changed, 2 insertions, 9 deletions
diff --git a/docs/contracts/functions.rst b/docs/contracts/functions.rst
index 76245952..522ce5c4 100644
--- a/docs/contracts/functions.rst
+++ b/docs/contracts/functions.rst
@@ -236,9 +236,9 @@ functions match the given function identifier (or if no data was supplied at
all).
Furthermore, this function is executed whenever the contract receives plain
-Ether (without data). Additionally, in order to receive Ether, the fallback function
+Ether (without data). To receive Ether and add it to the total balance of the contract, the fallback function
must be marked ``payable``. If no such function exists, the contract cannot receive
-Ether through regular transactions.
+Ether through regular transactions and throws an exception.
In the worst case, the fallback function can only rely on 2300 gas being
available (for example when `send` or `transfer` is used), leaving little
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst
index 11db780c..645789ce 100644
--- a/docs/frequently-asked-questions.rst
+++ b/docs/frequently-asked-questions.rst
@@ -54,13 +54,6 @@ Yes, you can use ``abi.encodePacked``::
}
}
-What happens if you send ether along with a function call to a contract?
-========================================================================
-
-It gets added to the total balance of the contract, just like when you send ether when creating a contract.
-You can only send ether along to a function that has the ``payable`` modifier,
-otherwise an exception is thrown.
-
******************
Advanced Questions
******************