aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2017-09-21 20:15:13 +0800
committerLefteris Karapetsas <lefteris@refu.co>2017-09-21 20:15:13 +0800
commit7f88d439375ad97269b7de231cf3c3f22c36c6c8 (patch)
treec1a16790423d9b6e33be77820e7a0c0da9d8fcc7
parentab8b1bcc72d33a5aaf8dd2c932496e27733d6f83 (diff)
downloaddexon-solidity-7f88d439375ad97269b7de231cf3c3f22c36c6c8.tar
dexon-solidity-7f88d439375ad97269b7de231cf3c3f22c36c6c8.tar.gz
dexon-solidity-7f88d439375ad97269b7de231cf3c3f22c36c6c8.tar.bz2
dexon-solidity-7f88d439375ad97269b7de231cf3c3f22c36c6c8.tar.lz
dexon-solidity-7f88d439375ad97269b7de231cf3c3f22c36c6c8.tar.xz
dexon-solidity-7f88d439375ad97269b7de231cf3c3f22c36c6c8.tar.zst
dexon-solidity-7f88d439375ad97269b7de231cf3c3f22c36c6c8.zip
docs: Specify gas fallback function from call
Specify that also 21k gas is needed for fallback functions originating from external function calls.
-rw-r--r--docs/contracts.rst3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 3bd6f6a8..69600fc1 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -519,8 +519,7 @@ Ether (without data). Additionally, in order to receive Ether, the fallback func
must be marked ``payable``. If no such function exists, the contract cannot receive
Ether through regular transactions.
-In such a context, there is usually very little gas available to the function call (to be precise, 2300 gas),
-so it is important to make fallback functions as cheap as possible.
+In such a context, there is usually very little gas available to the function call (to be precise, 2300 gas), so it is important to make fallback functions as cheap as possible. Note that the gas required by a transaction (as opposed to an internal call) that invokes the fallback function is much higher, because each transaction charges an additional amount of 21000 gas or more for things like signature checking.
In particular, the following operations will consume more gas than the stipend provided to a fallback function: