aboutsummaryrefslogtreecommitdiffstats
path: root/docs/introduction-to-smart-contracts.rst
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-03-10 22:56:25 +0800
committerchriseth <c@ethdev.com>2016-03-12 00:49:59 +0800
commitd0bb87ae88602f4afc091d9cda1be352258a6df9 (patch)
treec70e18546dcdd7bdaa5cfb61c8562e19a5405499 /docs/introduction-to-smart-contracts.rst
parentb8bcb706e946ca05f55139e668fe90297a382a0a (diff)
downloaddexon-solidity-d0bb87ae88602f4afc091d9cda1be352258a6df9.tar
dexon-solidity-d0bb87ae88602f4afc091d9cda1be352258a6df9.tar.gz
dexon-solidity-d0bb87ae88602f4afc091d9cda1be352258a6df9.tar.bz2
dexon-solidity-d0bb87ae88602f4afc091d9cda1be352258a6df9.tar.lz
dexon-solidity-d0bb87ae88602f4afc091d9cda1be352258a6df9.tar.xz
dexon-solidity-d0bb87ae88602f4afc091d9cda1be352258a6df9.tar.zst
dexon-solidity-d0bb87ae88602f4afc091d9cda1be352258a6df9.zip
Documentation for delegatecall.
Diffstat (limited to 'docs/introduction-to-smart-contracts.rst')
-rw-r--r--docs/introduction-to-smart-contracts.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst
index 711e7082..22dbbcb7 100644
--- a/docs/introduction-to-smart-contracts.rst
+++ b/docs/introduction-to-smart-contracts.rst
@@ -406,15 +406,15 @@ a location in the caller's memory preallocated by the caller.
Calls are **limited** to a depth of 1024, which means that for more complex
operations, loops should be preferred over recursive calls.
-.. index:: callcode, library
+.. index:: delegatecall, callcode, library
-Callcode and Libraries
-======================
+Delegatecall / Callcode and Libraries
+=====================================
-There exists a special variant of a message call, named **callcode**
+There exists a special variant of a message call, named **delegatecall**
which is identical to a message call apart from the fact that
the code at the target address is executed in the context of the calling
-contract.
+contract and `msg.sender` and `msg.value` do not change their values.
This means that a contract can dynamically load code from a different
address at runtime. Storage, current address and balance still
@@ -461,4 +461,4 @@ The remaining Ether stored at that address is sent to a designated
target and then the storage and code is removed.
Note that even if a contract's code does not contain the `SELFDESTRUCT`
-opcode, it can still perform that operation using callcode.
+opcode, it can still perform that operation using delegatecall or callcode.