diff options
author | Denton Liu <liu.denton+github@gmail.com> | 2016-08-26 03:43:04 +0800 |
---|---|---|
committer | Denton Liu <liu.denton+github@gmail.com> | 2016-08-26 03:43:04 +0800 |
commit | c276086f3fcce0317abd45452d74c18aa0522ed9 (patch) | |
tree | 0e0536ae579864e5183e12a6acfbb992f6f1b573 /docs/contracts.rst | |
parent | f329d5e772ed4314897c46b67b1459f39838a2cc (diff) | |
download | dexon-solidity-c276086f3fcce0317abd45452d74c18aa0522ed9.tar.gz dexon-solidity-c276086f3fcce0317abd45452d74c18aa0522ed9.tar.zst dexon-solidity-c276086f3fcce0317abd45452d74c18aa0522ed9.zip |
Write about what fallback functions cannot do
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r-- | docs/contracts.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst index e9fc4526..b257dcbb 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -434,6 +434,14 @@ Ether (without data). In such a context, there is 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 particular, the following operations will consume more gas than the stipend provided to a fallback function: + +- Writing to storage +- Creating a contract +- Calling an external function which consumes a large amount of gas + +Please ensure you test your fallback function thoroughly to ensure the execution cost is less than 2300 gas before deploying a contract. + :: contract Test { |