<divclass="link title"><ahref="/v5/">Documentation</a></div><divclass="base show link depth-1"><ahref="/v5/getting-started/">Getting Started</a></div><divclass="base ancestor show link depth-1"><ahref="/v5/concepts/">Ethereum Basics</a></div><divclass="myself ancestor ancestor show link depth-2"><ahref="/v5/concepts/events/">Events</a></div><divclass="show link depth-2"><ahref="/v5/concepts/gas/">Gas</a></div><divclass="show link depth-2"><ahref="/v5/concepts/security/">Security</a></div><divclass="base show link depth-1"><ahref="/v5/api/">Application Programming Interface</a></div><divclass="hide link depth-2"><ahref="/v5/api/contract/">Contract Interaction</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/contract/">Contract</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/contract-factory/">ContractFactory</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/example/">Example: ERC-20 Contract</a></div><divclass="hide link depth-2"><ahref="/v5/api/signer/">Signers</a></div><divclass="hide link depth-2"><ahref="/v5/api/providers/">Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/provider/">Provider</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/jsonrpc-provider/">JsonRpcProvider</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/api-providers/">API Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/other/">Other Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/types/">Types</a></div><divclass="hide link depth-2"><ahref="/v5/api/utils/">Utilities</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/abi/">Application Binary Interface</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/coder/">AbiCoder</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/formats/">ABI Formats</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/fragments/">Fragments</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/interface/">Interface</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/address/">Addresses</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/bignumber/">BigNumber</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/bytes/">Byte Manipulation</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/constants/">Constants</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/display-logic/">Display Logic and Input</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/encoding/">Encoding Utilities</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/fixednumber/">FixedNumber</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/hashing/">Hashing Algorithms</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/hdnode/">HD Wallet</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/logger/">Logging</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/properties/">Property Utilities</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/signing-key/">Signing Key</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/strings/">Strings</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/transactions/">Transactions</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/web/">Web Utilities</a></div><divclass="hide link depth-3"><ahref="/v5/api/utils/wordlists/">Wordlists</a></div><divclass="hide link depth-2"><ahref="/v5/api/other/">Other Libraries</a></div><divclass="hide link depth-3"><ahref="/v5/api/other/assembly/">Assembly</a></div><divclass="hide link depth-4"><ahref="/v5/api/other/assembly/dialect/">Ethers ASM Dialect</a></div><divclass="hide link depth-4"><ahref="/v5/api/other/assembly/api/">Utilities</a></div><divclass="hide link depth-4"><ahref="/v5/api/other/assembly/ast/">Abstract Syntax Tree</a></div><divclass="hide link depth-3"><ahref="/v5/api/other/hardware/">Hardware Wallets</a></div><divclass="hidelinkde
<aname="events"></a><h1class="show-anchors"><div>Events<divclass="anchors"><aclass="self"href="/v5/concepts/events/#events"></a></div></div></h1><p>Explain how topics and such work</p>
<aname="events--solidity-topics"></a><h2class="show-anchors"><div>Solidity Topics<divclass="anchors"><aclass="self"href="/v5/concepts/events/#events--solidity-topics"></a></div></div></h2><p>How to compute the topic...</p>
<aname="events--logs-and-filtering"></a><h2class="show-anchors"><div>Logs and Filtering<divclass="anchors"><aclass="self"href="/v5/concepts/events/#events--logs-and-filtering"></a></div></div></h2><p>Example hog logs are used.</p>
<p>Link to provider.getLogs and contract.on</p>
<aname="events--logs-and-filtering--filters"></a><h3class="show-anchors"><div>Filters<divclass="anchors"><aclass="self"href="/v5/concepts/events/#events--logs-and-filtering--filters"></a></div></div></h3><p>Filter are used as a way to query ... efficient, explain bloom filters lightly</p>
<p>A filter may have up to 4 topic-sets, where each topic-set refers to a condition that must match the log topic in that position (i.e. each condition is <codeclass="inline">AND</code>-ed together).</p>
<p>If a topic-set is <codeclass="inline">null</code>, a log topic in that position is not filtered at all and <b>any value</b> matches.</p>
<p>If a topic-set is a single topic, a log topic in that position must match <b>that topic</b>.</p>
<p>If a topic-set is an array of topics, a log topic in that position must match any <b>one</b> of topics (i.e. the topic in thie position are <codeclass="inline">OR</code>-ed).</p>
<tableclass="table full"><tr><tdalign="center"width="25%"><b>Topic-Sets</b></td><tdalign="center"colspan="3"width="75%"><b>Matching Logs</b></td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ A ]</td><tdalign="left"colspan="3"rowspan="2"width="75%">topic[0] = A</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ A, null ]</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ null, B ]</td><tdalign="left"colspan="3"rowspan="3"width="75%">topic[1] = B</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ null, [ B ] ]</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ null, [ B ], null ]</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ A, B ]</td><tdalign="left"colspan="3"rowspan="3"width="75%">(topic[0] = A) <b>AND</b> (topic[1] = B)</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ A, [ B ] ]</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ A, [ B ], null ]</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ [ A, B ] ]</td><tdalign="left"colspan="3"rowspan="2"width="75%">(topic[0] = A) <b>OR</b> (topic[0] = B)</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ [ A, B ], null ]</td><tdclass="fix"> </td></tr><tr><tdalign="center"width="25%">[ [ A, B ], [ C, D ] ]</td><tdalign="left"colspan="3"width="75%"><b>[</b> (topic[0] = A) <b>OR</b> (topic[0] = B) <b>]</b><b>AND</b><b>[</b> (topic[1] = C) <b>OR</b> (topic[1] = D) <b>]</b></td><tdclass="fix"> </td></tr><tr><tdclass="table-title"colspan="4">Example Log Matching</td><tdclass="fix"> </td></tr></table><divclass="code-title"><div>ERC-20 Transfer Filter Examples</div></div><divclass="code">// <hide>
//!</div><aname="events--logs-and-filtering--other-things-todo"></a><h3class="show-anchors"><div>Other Things? TODO<divclass="anchors"><aclass="self"href="/v5/concepts/events/#events--logs-and-filtering--other-things-todo"></a></div></div></h3><p>Explain what happens to strings and bytes, how to filter and retain the value</p>
<divclass="copyright">The content of this site is licensed under the <ahref="https://choosealicense.com/licenses/cc-by-4.0/">Creative Commons License</a>. Generated on June 12, 2020, 3:31am.</div>