From a39bce010e45ad96aff99593f9ef1de7a1a94bab Mon Sep 17 00:00:00 2001 From: Anton Paymyshev Date: Thu, 8 Sep 2022 17:50:44 +0700 Subject: [PATCH 1/3] Fix dynamic array spec --- 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 9164ae6a1..fc65ffa32 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -191,7 +191,7 @@ on the type of ``X`` being - ``T[]`` where ``X`` has ``k`` elements (``k`` is assumed to be of type ``uint256``): - ``enc(X) = enc(k) enc([X[0], ..., X[k-1]])`` + ``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. From ddea589ffce2c2f16070af2b35ecdff2846a8d99 Mon Sep 17 00:00:00 2001 From: Anton Paymyshev Date: Fri, 9 Sep 2022 18:31:24 +0700 Subject: [PATCH 2/3] fix per review --- 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 fc65ffa32..2e6f7c56b 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -191,7 +191,7 @@ on the type of ``X`` being - ``T[]`` where ``X`` has ``k`` elements (``k`` is assumed to be of type ``uint256``): - ``enc(X) = enc(k) enc(([X[0], ..., X[k-1]]))`` + ``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. From faffe3e0a404f3afa80557e615340d6f1ace086b Mon Sep 17 00:00:00 2001 From: Anton Paymyshev Date: Fri, 9 Sep 2022 18:38:49 +0700 Subject: [PATCH 3/3] Update docs/abi-spec.rst Co-authored-by: Daniel Kirchner --- 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 2e6f7c56b..7906d75ff 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -193,7 +193,7 @@ 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 an array of static size ``k``, prefixed with + 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. - ``bytes``, of length ``k`` (which is assumed to be of type ``uint256``):