aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorSteve Waldman <swaldman@mchange.com>2017-12-19 19:09:13 +0800
committerSteve Waldman <swaldman@mchange.com>2017-12-19 19:09:13 +0800
commit75dd416c6e84209f2d5fe8657a83d9e3e799fe7a (patch)
tree56330393afb838111c54d7f1a52a9a96a12d68bd /docs
parentbae913368a438b2de7f3be93618feb21e155055e (diff)
downloaddexon-solidity-75dd416c6e84209f2d5fe8657a83d9e3e799fe7a.tar
dexon-solidity-75dd416c6e84209f2d5fe8657a83d9e3e799fe7a.tar.gz
dexon-solidity-75dd416c6e84209f2d5fe8657a83d9e3e799fe7a.tar.bz2
dexon-solidity-75dd416c6e84209f2d5fe8657a83d9e3e799fe7a.tar.lz
dexon-solidity-75dd416c6e84209f2d5fe8657a83d9e3e799fe7a.tar.xz
dexon-solidity-75dd416c6e84209f2d5fe8657a83d9e3e799fe7a.tar.zst
dexon-solidity-75dd416c6e84209f2d5fe8657a83d9e3e799fe7a.zip
[Docs] Note that events can contain both indexed and unindexed arguments for values of dynamic-length types.
Diffstat (limited to 'docs')
-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 458c4ce0..b81e35a6 100644
--- a/docs/abi-spec.rst
+++ b/docs/abi-spec.rst
@@ -288,7 +288,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).
+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.
JSON
====