title: eth::EventFilter summary: Specifies which logs to accept: by emitting address(es) and/or topic(s).
eth::EventFilter¶
Specifies which logs to accept: by emitting address(es) and/or topic(s). More...
#include <event_filter.hpp>
Public Functions¶
| Name | |
|---|---|
| bool | matches(const codec::LogEntry & log, uint64_t block =0) const Test whether a log entry matches this filter. |
Public Attributes¶
| Name | |
|---|---|
| std::vector< codec::Address > | addresses Contracts to watch; empty means "any contract". |
| std::vector< std::optional< codec::Hash256 > > | topics |
| std::optional< uint64_t > | from_block Optional inclusive block range. |
| std::optional< uint64_t > | to_block |
Detailed Description¶
Specifies which logs to accept: by emitting address(es) and/or topic(s).
Topic matching follows the eth_getLogs semantics:
- An empty topics vector matches any log.
- topics[i] == std::nullopt matches any value at position i.
- topics[i] == some_hash matches only that exact value at position i.
Address matching:
- An empty addresses vector matches logs from any contract.
- Otherwise only logs whose emitting address appears in the list are accepted.
Public Functions Documentation¶
function matches¶
Test whether a log entry matches this filter.
Parameters:
- log The log entry to test.
- block The block number the log was included in (0 if unknown).
Return: true if the log satisfies all filter constraints.
Public Attributes Documentation¶
variable addresses¶
Contracts to watch; empty means "any contract".
variable topics¶
Per-position topic constraints. Each slot is optional
variable from_block¶
Optional inclusive block range.
variable to_block¶
Updated on 2026-04-26 at 17:04:52 -0700