From 1b63b8822e09d7be9c399b00b1c48f333dfa1ee0 Mon Sep 17 00:00:00 2001 From: gitpusha Date: Tue, 11 Feb 2020 10:32:33 +0100 Subject: [PATCH] Added note recommending to avoid relying on hardcoded gas values --- docs/types/value-types.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/types/value-types.rst b/docs/types/value-types.rst index 9dae37912..a912534ac 100644 --- a/docs/types/value-types.rst +++ b/docs/types/value-types.rst @@ -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``.