aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-10 21:40:37 +0800
committerGitHub <noreply@github.com>2018-10-10 21:40:37 +0800
commit62fb0e29c9177996b75cd49cbd4237256dc8111e (patch)
tree9ea5cea61a80adecd8ef543b3c79e953880dcf3b /docs
parentd2157ae5e93f02b9fde466420b814e760b53f9a8 (diff)
parent08cf304159f95639906f8e147fc628daf56514ea (diff)
downloaddexon-solidity-62fb0e29c9177996b75cd49cbd4237256dc8111e.tar
dexon-solidity-62fb0e29c9177996b75cd49cbd4237256dc8111e.tar.gz
dexon-solidity-62fb0e29c9177996b75cd49cbd4237256dc8111e.tar.bz2
dexon-solidity-62fb0e29c9177996b75cd49cbd4237256dc8111e.tar.lz
dexon-solidity-62fb0e29c9177996b75cd49cbd4237256dc8111e.tar.xz
dexon-solidity-62fb0e29c9177996b75cd49cbd4237256dc8111e.tar.zst
dexon-solidity-62fb0e29c9177996b75cd49cbd4237256dc8111e.zip
Merge pull request #5163 from ethereum/docDeployment
Explain deployment.
Diffstat (limited to 'docs')
-rw-r--r--docs/contracts.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 0d1b029b..d4160eac 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -31,6 +31,11 @@ When a contract is created, its constructor_ (a function declared with the ``co
A constructor is optional. Only one constructor is allowed, which means
overloading is not supported.
+After the constructor has executed, the final code of the contract is deployed to the
+blockchain. This code includes all public and external functions and all functions
+that are reachable from there through function calls. The deployed code does not
+include the constructor code or internal functions only called from the constructor.
+
.. index:: constructor;arguments
Internally, constructor arguments are passed :ref:`ABI encoded <ABI>` after the code of
@@ -1089,8 +1094,13 @@ initialisation code.
Before the constructor code is executed, state variables are initialised to
their specified value if you initialise them inline, or zero if you do not.
-After the constructor has run, the final code of the contract is returned. The deployment of
+After the constructor has run, the final code of the contract is deployed
+to the blockchain. The deployment of
the code costs additional gas linear to the length of the code.
+This code includes all functions that are part of the public interface
+and all functions that are reachable from there through function calls.
+It does not include the constructor code or internal functions that are
+only called from the constructor.
Constructor functions can be either ``public`` or ``internal``. If there is no
constructor, the contract will assume the default constructor, which is