aboutsummaryrefslogtreecommitdiffstats
path: root/docs/types.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-06-20 03:32:03 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-08-01 18:04:35 +0800
commitc8232d9759458d5f6e1442533457d8529686eea7 (patch)
treecb1d8f4876b4984213134ad56ff5fb15db867d57 /docs/types.rst
parent21888e246b771325ea55da39d7f335638da1a98e (diff)
downloaddexon-solidity-c8232d9759458d5f6e1442533457d8529686eea7.tar.gz
dexon-solidity-c8232d9759458d5f6e1442533457d8529686eea7.tar.zst
dexon-solidity-c8232d9759458d5f6e1442533457d8529686eea7.zip
Disallow conversion between unrelated contract types.
Diffstat (limited to 'docs/types.rst')
-rw-r--r--docs/types.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/types.rst b/docs/types.rst
index d6767b54..3aad413d 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -192,6 +192,23 @@ The ``.gas()`` option is available on all three methods, while the ``.value()``
.. note::
The use of ``callcode`` is discouraged and will be removed in the future.
+Contract Types
+--------------
+
+Every :ref:`contract<contracts>` defines its own type. Contracts can be implicitly converted
+to contracts they inherit from. They can be explicitly converted from and to ``address`` types.
+
+The data representation of a contract is identical to that of the ``address`` type and
+this type is also used in the :ref:`ABI<ABI>`.
+
+Contracts do not support any operators.
+
+The members of contract types are the external functions of the contract including
+public state variables.
+
+.. note::
+ Starting with version 0.5.0 contracts do not derive from the address type, but can still be explicitly converted to address.
+
.. index:: byte array, bytes32