From bc854395766514d83f44b93816bfd2406a57f501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Mon, 31 Aug 2020 18:35:01 +0200 Subject: [PATCH 1/2] docs/abi-spec.rst: Note about zero-length fixed-size arrays --- docs/abi-spec.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index ddffaf3f4..cf5ed9699 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -61,7 +61,7 @@ The following elementary types exist: - ``bool``: equivalent to ``uint8`` restricted to the values 0 and 1. For computing the function selector, ``bool`` is used. - ``fixedx``: signed fixed-point decimal number of ``M`` bits, ``8 <= M <= 256``, - ``M % 8 ==0``, and ``0 < N <= 80``, which denotes the value ``v`` as ``v / (10 ** N)``. + ``M % 8 == 0``, and ``0 < N <= 80``, which denotes the value ``v`` as ``v / (10 ** N)``. - ``ufixedx``: unsigned variant of ``fixedx``. @@ -76,6 +76,9 @@ The following (fixed-size) array type exists: - ``[M]``: a fixed-length array of ``M`` elements, ``M >= 0``, of the given type. + .. note:: + While this ABI specification can express fixed-length arrays with zero elements, they're not supported by the compiler. + The following non-fixed-size types exist: - ``bytes``: dynamic sized byte sequence. From cfc878f8a5abdf3f66fb3c6dc243cb0eb0935c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Wed, 28 Oct 2020 11:14:42 +0100 Subject: [PATCH 2/2] docs/abi-spec.rst: There are 256 possible values for uint8 enums --- docs/abi-spec.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index cf5ed9699..a93a63747 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -111,7 +111,7 @@ them. +-------------------------------+-----------------------------------------------------------------------------+ |:ref:`enum` |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 | +| |For example, an ``enum`` of 256 values or less is mapped to ``uint8`` and | | |an ``enum`` of 256 values is mapped to ``uint16``. | +-------------------------------+-----------------------------------------------------------------------------+ |:ref:`struct` |``tuple`` |