aboutsummaryrefslogtreecommitdiffstats
path: root/docs/abi-spec.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/abi-spec.rst')
-rw-r--r--docs/abi-spec.rst25
1 files changed, 23 insertions, 2 deletions
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst
index 92af8f0c..4e7c88d0 100644
--- a/docs/abi-spec.rst
+++ b/docs/abi-spec.rst
@@ -78,8 +78,29 @@ Types can be combined to a tuple by enclosing them inside parentheses, separated
It is possible to form tuples of tuples, arrays of tuples and so on. It is also possible to form zero-tuples (where ``n == 0``).
-.. note::
- Solidity supports all the types presented above with the same names with the exception of tuples. The ABI tuple type is utilised for encoding Solidity ``structs``.
+Mapping Solidity to ABI types
+-----------------------------
+
+Solidity supports all the types presented above with the same names with the
+exception of tuples. On the other hand, some Solidity types are not supported
+by the ABI. The following table shows on the left column Solidity types that
+are not part of the ABI, and on the right column the ABI types that represent
+them.
+
++-------------------------------+-----------------------------------------------------------------------------+
+| Solidity | ABI |
++===============================+=============================================================================+
+|:ref:`address payable<address>`|``address`` |
++-------------------------------+-----------------------------------------------------------------------------+
+|:ref:`contract<contracts>` |``address`` |
++-------------------------------+-----------------------------------------------------------------------------+
+|:ref:`enum<enums>` |smallest ``uint`` type that is large enough to hold all values |
+| | |
+| |For example, an ``enum`` of 255 values or less is mapped to ``uint8`` and |
+| |an ``enum`` of 256 values is mapped to ``uint16``. |
++-------------------------------+-----------------------------------------------------------------------------+
+|:ref:`struct<structs>` |``tuple`` |
++-------------------------------+-----------------------------------------------------------------------------+
Formal Specification of the Encoding
====================================