Added note recommending to avoid relying on hardcoded gas values

This commit is contained in:
gitpusha 2020-02-11 10:32:33 +01:00
parent d033c2f767
commit 1b63b8822e

View File

@ -300,6 +300,11 @@ All three functions ``call``, ``delegatecall`` and ``staticcall`` are very low-l
The ``gas`` option is available on all three methods, while the ``value`` option is not
supported for ``delegatecall``.
.. note::
It is best to avoid relying on hardcoded gas values in your smart contract code,
regardless of whether state is read from or written to, as this can have many pitfalls.
Also, access to gas might change in the future.
.. note::
All contracts can be converted to ``address`` type, so it is possible to query the balance of the
current contract using ``address(this).balance``.