joinTransactions, the
response also contains the transaction of every matched log:
transactions stream (52 rows here) and a logs stream (72 rows). Several
logs can belong to one transaction, which appears once.
Rules
- It needs at least one
logsfilter object and at least onefields.transactionfield (400otherwise). - If you also send
transactionsfilters, the transactions stream is the union: the filter’s matches plus the matched logs’ transactions, each once. - Transactions come back in the usual
(block_number, transaction_index)order. - Joined transactions count toward
maxObjectsand are billed like any other row. - A
transactions[].statusfilter, if present, applies to the joined transactions too. Atransactions[].typefilter doesn’t: it only narrows its own object’s matches.
Joining in your client
Match rows on(block_number, transaction_index). Select those two fields on both row types:
transaction_hash (log) = hash (transaction), but hashes are 32 bytes
each; two integers are smaller and faster.
The other direction
Matching a transaction does not pull in its logs. To get a transaction’s logs, filter logs too (for example on the contract it called) and join client-side on(block_number, transaction_index).