aboutsummaryrefslogtreecommitdiffstats
path: root/docs/frequently-asked-questions.rst
diff options
context:
space:
mode:
authorDenton Liu <liu.denton+github@gmail.com>2016-05-25 22:10:37 +0800
committerDenton Liu <liu.denton+github@gmail.com>2016-05-30 21:44:33 +0800
commitd0a0e4f3d2f70e7957254987261c10807ed963e4 (patch)
treee723698a595d6f4f2f07bb0150ea8fef00825dc9 /docs/frequently-asked-questions.rst
parent17f23629f1c6bbe1704482ccf75071fdbb3ec17f (diff)
downloaddexon-solidity-d0a0e4f3d2f70e7957254987261c10807ed963e4.tar.gz
dexon-solidity-d0a0e4f3d2f70e7957254987261c10807ed963e4.tar.zst
dexon-solidity-d0a0e4f3d2f70e7957254987261c10807ed963e4.zip
Added a section about .send() returning false
Diffstat (limited to 'docs/frequently-asked-questions.rst')
-rw-r--r--docs/frequently-asked-questions.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst
index 88775e4c..b3667a11 100644
--- a/docs/frequently-asked-questions.rst
+++ b/docs/frequently-asked-questions.rst
@@ -846,6 +846,9 @@ If you want to send 20 Ether from a contract to the address ``x``, you use ``x.s
Here, ``x`` can be a plain address or a contract. If the contract already explicitly defines
a function ``send`` (and thus overwrites the special function), you can use ``address(x).send(20 ether);``.
+Note that the call to ``send`` may fail in certain conditions, such as if you have insufficient funds, so you should always check the return value.
+``send`` returns ``true`` if the send was successful and ``false`` otherwise.
+
What does the following strange check do in the Custom Token contract?
======================================================================