aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-10 21:21:40 +0800
committerGitHub <noreply@github.com>2018-10-10 21:21:40 +0800
commit4035c96a32897d91da877dfb84e78e11e12b1e30 (patch)
tree60a4ed632784ebc9f9f7abd8fd419f6c3a873a88 /docs
parent06200b4b64c911ea2e0b12076e0fa02093dacbf8 (diff)
parent8a15058a217b6765aa5a5085b328edcb84694927 (diff)
downloaddexon-solidity-4035c96a32897d91da877dfb84e78e11e12b1e30.tar
dexon-solidity-4035c96a32897d91da877dfb84e78e11e12b1e30.tar.gz
dexon-solidity-4035c96a32897d91da877dfb84e78e11e12b1e30.tar.bz2
dexon-solidity-4035c96a32897d91da877dfb84e78e11e12b1e30.tar.lz
dexon-solidity-4035c96a32897d91da877dfb84e78e11e12b1e30.tar.xz
dexon-solidity-4035c96a32897d91da877dfb84e78e11e12b1e30.tar.zst
dexon-solidity-4035c96a32897d91da877dfb84e78e11e12b1e30.zip
Merge pull request #5184 from ethereum/viewFunctionDocs
Library view functions
Diffstat (limited to 'docs')
-rw-r--r--docs/contracts.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index faef3fc2..0d1b029b 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -485,7 +485,11 @@ Functions can be declared ``view`` in which case they promise not to modify the
.. note::
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.
+ to stay unmodified as part of the EVM execution. For library ``view`` functions
+ ``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: