aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-10-10 21:10:25 +0800
committerErik Kundt <bitshift@posteo.org>2018-10-10 21:10:25 +0800
commit8a15058a217b6765aa5a5085b328edcb84694927 (patch)
treecd4107df97121b8fc18eed9cbf7e1d51f756ea91
parent4beabf6686c59fbe4ac6d4a4a158eca41a0b682a (diff)
downloaddexon-solidity-8a15058a217b6765aa5a5085b328edcb84694927.tar
dexon-solidity-8a15058a217b6765aa5a5085b328edcb84694927.tar.gz
dexon-solidity-8a15058a217b6765aa5a5085b328edcb84694927.tar.bz2
dexon-solidity-8a15058a217b6765aa5a5085b328edcb84694927.tar.lz
dexon-solidity-8a15058a217b6765aa5a5085b328edcb84694927.tar.xz
dexon-solidity-8a15058a217b6765aa5a5085b328edcb84694927.tar.zst
dexon-solidity-8a15058a217b6765aa5a5085b328edcb84694927.zip
Adds more specific explanation of library view functions calls.
-rw-r--r--docs/contracts.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index e4a81684..0d1b029b 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -486,8 +486,10 @@ Functions can be declared ``view`` in which case they promise not to modify the
If the compiler's EVM target is Byzantium or newer (default) the opcode
``STATICCALL`` is used for ``view`` functions which enforces the state
to stay unmodified as part of the EVM execution. For library ``view`` functions
- ``DELEGATECALL`` is used. Since they are executed in the context of the calling
- contract, the static checker is extended to the library.
+ ``DELEGATECALL`` is used, because there is no combined ``DELEGATECALL`` and ``STATICCALL``.
+ This means library ``view`` functions do not have run-time checks that prevent state
+ modifications. This should not impact security negatively because library code is
+ usually known at compile-time and the static checker performs compile-time checks.
The following statements are considered modifying the state: