aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorbernard peh <bpeh777@gmail.com>2018-03-02 20:40:17 +0800
committerbernard peh <bpeh777@gmail.com>2018-03-02 20:40:17 +0800
commitcde4e3172be3fe87e4e229f28ad96b0844fa4bd4 (patch)
treef2b65d9fc080cf2eea48e72881e6d7c510c651e7 /docs
parent2c086cb90b59116fc300f52c135c465c82db1b1e (diff)
downloaddexon-solidity-cde4e3172be3fe87e4e229f28ad96b0844fa4bd4.tar
dexon-solidity-cde4e3172be3fe87e4e229f28ad96b0844fa4bd4.tar.gz
dexon-solidity-cde4e3172be3fe87e4e229f28ad96b0844fa4bd4.tar.bz2
dexon-solidity-cde4e3172be3fe87e4e229f28ad96b0844fa4bd4.tar.lz
dexon-solidity-cde4e3172be3fe87e4e229f28ad96b0844fa4bd4.tar.xz
dexon-solidity-cde4e3172be3fe87e4e229f28ad96b0844fa4bd4.tar.zst
dexon-solidity-cde4e3172be3fe87e4e229f28ad96b0844fa4bd4.zip
change the language so that it doesn't sound like send and transfer is providing the stipend
Diffstat (limited to 'docs')
-rw-r--r--docs/contracts.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index cfd5256a..3df722db 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -523,7 +523,12 @@ 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.
-It is worth nothing that the "send" or "transfer" function only has a 2300 gas stipend. If the fallback function is called by another contract account using the send/transfer function (eg address.transfer(1 ether)), then the fallback function only has 2300 gas to spend, meaning that it cannot do much other than basic logging.
+In the worst case, the fallback function can only rely on 2300 gas being available (for example when send or transfer is used), leaving not much room to perform other operations except basic logging. The following operations will consume more gas than the 2300 gas stipend:
+
+- Writing to storage
+- Creating a contract
+- Calling an external function which consumes a large amount of gas
+- Sending Ether
Like any function, the fallback function can execute complex operations as long as there is enough gas passed on to it.