@tevm/voltaire / primitives/LogFilter
primitives/LogFilter
Classes
InvalidLogFilterError
Defined in: src/primitives/LogFilter/errors.js:4 Error thrown when LogFilter is invalidExtends
Error
Constructors
Constructor
new InvalidLogFilterError(Defined in: src/primitives/LogFilter/errors.js:9message,details?):InvalidLogFilterError
Parameters
message
string
details?
object
Returns
InvalidLogFilterError
Overrides
Error.constructor
Properties
details
details:Defined in: src/primitives/LogFilter/errors.js:13object|undefined
name
name: string
Defined in: src/primitives/LogFilter/errors.js:11
Inherited from
Error.name
Type Aliases
BlockTag
BlockTag =Defined in: src/primitives/LogFilter/LogFilterType.ts:10 Block identifier for log filter queries"earliest"|"latest"|"pending"
LogFilterType
LogFilterType =Defined in: src/primitives/LogFilter/LogFilterType.ts:36 Log filter parameters for eth_getLogs and eth_newFilter Filters can specify:object&object
- Block range (fromBlock/toBlock) OR specific block (blockhash)
- Contract address(es) to filter by
- Topic filters for indexed event parameters
Type Declaration
address?
Single address or array of addresses to filter byreadonlyoptionaladdress:AddressType| readonlyAddressType[]
blockhash?
Specific block hash (mutually exclusive with fromBlock/toBlock)readonlyoptionalblockhash:HashType
fromBlock?
Starting block number or tagreadonlyoptionalfromBlock:BlockNumberType|BlockTag
toBlock?
Ending block number or tagreadonlyoptionaltoBlock:BlockNumberType|BlockTag
topics?
Topic filters (up to 4 indexed parameters)readonlyoptionaltopics:TopicFilterType
Type Declaration
[brand]
readonly[brand]:"LogFilter"
Example
Functions
from()
from(Defined in: src/primitives/LogFilter/from.js:30 Create LogFilter from parametersparams):LogFilterType
Parameters
params
Partial<LogFilterType>
Filter parameters
Returns
LogFilterType
Throws
Example
isEmpty()
isEmpty(Defined in: src/primitives/LogFilter/isEmpty.js:14 Check if log filter is empty (no filtering criteria)filter):boolean
Parameters
filter
LogFilterType
Returns
boolean
Example
matches()
matches(Defined in: src/primitives/LogFilter/matches.js:16 Check if a log entry matches this filterfilter,log):boolean
Parameters
filter
LogFilterType
log
EventLogType<AddressType, readonly HashType[]>
Log entry to test
Returns
boolean

