aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contracts.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r--docs/contracts.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 67d4a249..121c4de0 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -472,6 +472,13 @@ The following statements are considered modifying the state:
.. note::
Getter methods are marked ``view``.
+.. note::
+ If invalid explicit type conversions are used, state modifications are possible
+ even though a ``view`` function was called.
+ You can switch the compiler to use ``STATICCALL`` when calling such functions and thus
+ prevent modifications to the state on the level of the EVM by adding
+ ``pragma experimental "v0.5.0";``
+
.. warning::
The compiler does not enforce yet that a ``view`` method is not modifying state. It raises a warning though.
@@ -502,6 +509,18 @@ In addition to the list of state modifying statements explained above, the follo
}
}
+.. note::
+ If invalid explicit type conversions are used, state modifications are possible
+ even though a ``pure`` function was called.
+ You can switch the compiler to use ``STATICCALL`` when calling such functions and thus
+ prevent modifications to the state on the level of the EVM by adding
+ ``pragma experimental "v0.5.0";``
+
+.. warning::
+ It is not possible to prevent functions from reading the state at the level
+ of the EVM, it is only possible to prevent them from writing to the state
+ (i.e. only ``view`` can be enforced at the EVM level, ``pure`` can not).
+
.. warning::
Before version 0.4.17 the compiler didn't enforce that ``pure`` is not reading the state.