diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/contracts.rst | 8 | ||||
-rw-r--r-- | docs/using-the-compiler.rst | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst index 58e1dcdc..e61667dd 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -503,7 +503,7 @@ In addition to the list of state modifying statements explained above, the follo } .. warning:: - Before version 0.4.17 the compiler didn't enforce that ``view`` is not reading the state. + Before version 0.4.17 the compiler didn't enforce that ``pure`` is not reading the state. .. index:: ! fallback function, function;fallback @@ -523,16 +523,14 @@ 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. 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: +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 -Please ensure you test your fallback function thoroughly to ensure the execution cost is less than 2300 gas before deploying a contract. +Like any function, the fallback function can execute complex operations as long as there is enough gas passed on to it. .. note:: Even though the fallback function cannot have arguments, one can still use ``msg.data`` to retrieve diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index 66e3ac35..df30b6b4 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -101,6 +101,7 @@ Input Description enabled: true, runs: 500 }, + evmVersion: "byzantium", // Version of the EVM to compile for. Affects type checking and code generation. Can be homestead, tangerineWhistle, spuriousDragon, byzantium or constantinople // Metadata settings (optional) metadata: { // Use only literal content and not URLs (false by default) |