aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contracts.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-09 01:45:20 +0800
committerchriseth <chris@ethereum.org>2018-10-09 20:14:41 +0800
commit08cf304159f95639906f8e147fc628daf56514ea (patch)
treef68c39c7683f300fc158348b607b313fa8e24f9f /docs/contracts.rst
parent7d2dc14304e2ce1805069eef57904805ed6b96eb (diff)
downloaddexon-solidity-08cf304159f95639906f8e147fc628daf56514ea.tar.gz
dexon-solidity-08cf304159f95639906f8e147fc628daf56514ea.tar.zst
dexon-solidity-08cf304159f95639906f8e147fc628daf56514ea.zip
Explain deployment.
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r--docs/contracts.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index faef3fc2..8fa2b041 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
@@ -1085,8 +1090,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