doc: add warning to abi spec dynamic encoding

This commit is contained in:
James 2023-07-03 09:46:19 -07:00
parent 5d7533b540
commit 0809843225
No known key found for this signature in database
GPG Key ID: 38D007616833FA2F

View File

@ -193,8 +193,15 @@ on the type of ``X`` being
``enc(X) = enc(k) enc((X[0], ..., X[k-1]))``
i.e. it is encoded as if it were a tuple with ``k`` elements of the same type (resp. an array of static size ``k``), prefixed with
the number of elements.
i.e. it is encoded as if it were a tuple with ``k`` elements of the same type
(resp. an array of static size ``k``), prefixed with the number of elements.
.. warning::
For dynamically-sized ``T`` the offsets in the
encodings of ``head(X[i])`` for ``i < k`` are relative to the start of the
encoding of the internal tuple, ``enc((X[0], ..., X[k-1]))``, not to the
start of ``enc(X)``.
- ``bytes``, of length ``k`` (which is assumed to be of type ``uint256``):