aboutsummaryrefslogtreecommitdiffstats
path: root/docs/abi-spec.rst
diff options
context:
space:
mode:
authorDylan Wilson <dylanjw@protonmail.com>2018-07-26 06:28:53 +0800
committerDylan Wilson <dylanjw@protonmail.com>2018-07-26 06:28:53 +0800
commitd6d1a41286834b1691a35c5030084541999f6ef3 (patch)
treeee61b2711e792f482e14b0f521ff4d744cdedd24 /docs/abi-spec.rst
parent5a1b6856b49cfd5a99294a35cd764fb0053dff60 (diff)
downloaddexon-solidity-d6d1a41286834b1691a35c5030084541999f6ef3.tar.gz
dexon-solidity-d6d1a41286834b1691a35c5030084541999f6ef3.tar.zst
dexon-solidity-d6d1a41286834b1691a35c5030084541999f6ef3.zip
Update doc referencing packed mode encoding for dynamic typed topic args
Diffstat (limited to 'docs/abi-spec.rst')
-rw-r--r--docs/abi-spec.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst
index 82c9f67a..ec84d123 100644
--- a/docs/abi-spec.rst
+++ b/docs/abi-spec.rst
@@ -391,7 +391,7 @@ In effect, a log entry using this ABI is described as:
- ``topics[n]``: ``EVENT_INDEXED_ARGS[n - 1]`` (``EVENT_INDEXED_ARGS`` is the series of ``EVENT_ARGS`` that are indexed);
- ``data``: ``abi_serialise(EVENT_NON_INDEXED_ARGS)`` (``EVENT_NON_INDEXED_ARGS`` is the series of ``EVENT_ARGS`` that are not indexed, ``abi_serialise`` is the ABI serialisation function used for returning a series of typed values from a function, as described above).
-For all fixed-length Solidity types, the ``EVENT_INDEXED_ARGS`` array contains the 32-byte encoded value directly. However, for *types of dynamic length*, which include ``string``, ``bytes``, and arrays, ``EVENT_INDEXED_ARGS`` will contain the *Keccak hash* of the encoded value, rather than the encoded value directly. This allows applications to efficiently query for values of dynamic-length types (by setting the hash of the encoded value as the topic), but leaves applications unable to decode indexed values they have not queried for. For dynamic-length types, application developers face a trade-off between fast search for predetermined values (if the argument is indexed) and legibility of arbitrary values (which requires that the arguments not be indexed). Developers may overcome this tradeoff and achieve both efficient search and arbitrary legibility by defining events with two arguments — one indexed, one not — intended to hold the same value.
+For all fixed-length Solidity types, the ``EVENT_INDEXED_ARGS`` array contains the 32-byte encoded value directly. However, for *types of dynamic length*, which include ``string``, ``bytes``, and arrays, ``EVENT_INDEXED_ARGS`` will contain the *Keccak hash* of the packed encoded value (see :ref:`abi_packed_mode`), rather than the encoded value directly. This allows applications to efficiently query for values of dynamic-length types (by setting the hash of the encoded value as the topic), but leaves applications unable to decode indexed values they have not queried for. For dynamic-length types, application developers face a trade-off between fast search for predetermined values (if the argument is indexed) and legibility of arbitrary values (which requires that the arguments not be indexed). Developers may overcome this tradeoff and achieve both efficient search and arbitrary legibility by defining events with two arguments — one indexed, one not — intended to hold the same value.
.. _abi_json: