aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-04 21:46:11 +0800
committerGitHub <noreply@github.com>2018-05-04 21:46:11 +0800
commit8d666e180d5e109be55b381918014e1c090bd307 (patch)
tree567bb2b659b278936432618f91707c65e52c1910
parent150d226603cabd2c50b8324bd58bf06712311af9 (diff)
parent29572bdc482f8bac72e1acf0a67ce4f99d5f77f8 (diff)
downloaddexon-solidity-8d666e180d5e109be55b381918014e1c090bd307.tar
dexon-solidity-8d666e180d5e109be55b381918014e1c090bd307.tar.gz
dexon-solidity-8d666e180d5e109be55b381918014e1c090bd307.tar.bz2
dexon-solidity-8d666e180d5e109be55b381918014e1c090bd307.tar.lz
dexon-solidity-8d666e180d5e109be55b381918014e1c090bd307.tar.xz
dexon-solidity-8d666e180d5e109be55b381918014e1c090bd307.tar.zst
dexon-solidity-8d666e180d5e109be55b381918014e1c090bd307.zip
Merge pull request #3386 from nisdas/abi-spec-documentation
Fixed typos in abi-spec documentation
-rw-r--r--docs/abi-spec.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst
index b0b16e28..8591a07f 100644
--- a/docs/abi-spec.rst
+++ b/docs/abi-spec.rst
@@ -62,7 +62,7 @@ The following elementary types exist:
The following (fixed-size) array type exists:
-- ``<type>[M]``: a fixed-length array of ``M`` elements, ``M > 0``, of the given type.
+- ``<type>[M]``: a fixed-length array of ``M`` elements, ``M >= 0``, of the given type.
The following non-fixed-size types exist:
@@ -101,8 +101,8 @@ We distinguish static and dynamic types. Static types are encoded in-place and d
* ``bytes``
* ``string``
* ``T[]`` for any ``T``
-* ``T[k]`` for any dynamic ``T`` and any ``k > 0``
-* ``(T1,...,Tk)`` if any ``Ti`` is dynamic for ``1 <= i <= k``
+* ``T[k]`` for any dynamic ``T`` and any ``k >= 0``
+* ``(T1,...,Tk)`` if ``Ti`` is dynamic for some ``1 <= i <= k``
All other types are called "static".
@@ -119,14 +119,14 @@ on the type of ``X`` being
``enc(X) = head(X(1)) ... head(X(k)) tail(X(1)) ... tail(X(k))``
- where ``X(i)`` is the ``ith`` component of the value, and
+ where ``X = (X(1), ..., X(k))`` and
``head`` and ``tail`` are defined for ``Ti`` being a static type as
``head(X(i)) = enc(X(i))`` and ``tail(X(i)) = ""`` (the empty string)
and as
- ``head(X(i)) = enc(len( head(X(1)) ... head(X(k)) tail(X(1)) ... tail(X(i-1)) ))``
+ ``head(X(i)) = enc(len(head(X(1)) ... head(X(k)) tail(X(1)) ... tail(X(i-1)) ))``
``tail(X(i)) = enc(X(i))``
otherwise, i.e. if ``Ti`` is a dynamic type.
@@ -137,14 +137,14 @@ on the type of ``X`` being
- ``T[k]`` for any ``T`` and ``k``:
- ``enc(X) = enc((X[1], ..., X[k]))``
+ ``enc(X) = enc((X[0], ..., X[k-1]))``
i.e. it is encoded as if it were a tuple with ``k`` elements
of the same type.
- ``T[]`` where ``X`` has ``k`` elements (``k`` is assumed to be of type ``uint256``):
- ``enc(X) = enc(k) enc([X[1], ..., X[k]])``
+ ``enc(X) = enc(k) enc([X[0], ..., X[k-1]])``
i.e. it is encoded as if it were an array of static size ``k``, prefixed with
the number of elements.