# Subgraph: list logs in a transaction class

**URL:** <https://forum.thegraph.com/t/subgraph-list-logs-in-a-transaction-class/2573>\
**Category:** Questions & Feedback\
**Created:** [September 21, 2021, 5:16pm UTC](https://forum.thegraph.com/t/subgraph-list-logs-in-a-transaction-class/2573 "2021-09-21T17:16:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![0xCJ](https://avatars.discourse-cdn.com/v4/letter/0/6de8d8/32.png) [@0xCJ](https://forum.thegraph.com/u/0xCJ)\
**Post date:** [September 21, 2021, 5:16pm UTC](https://forum.thegraph.com/t/subgraph-list-logs-in-a-transaction-class/2573/1 "2021-09-21T17:16:36Z")

</div>

Hi there,  
The transaction class is defined as below, which doesn’t have any reference to the logs in one tx. I’d like to request a feature to have logs listed here.

One use case would be that in one tx, for example, a `FlashLoan` event as the trigger, the tokens can be transferred between many contracts. In order to map how the fund is traveled, I need to track all the `Transfer` events in a tx, to find out the journey of the funds.

```auto
class Transaction {
    hash: Bytes
    index: BigInt
    from: Address
    to: Address | null
    value: BigInt
    gasUsed: BigInt
    gasPrice: BigInt
    input: Bytes
    logs: [Event] // Can you add logs here? 
}

```

---

<div class="post-metadata">

**Author:** ![adamfuller](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@adamfuller](https://forum.thegraph.com/u/adamfuller)\
**Post date:** [October 14, 2021, 9:59pm UTC](https://forum.thegraph.com/t/subgraph-list-logs-in-a-transaction-class/2573/2 "2021-10-14T21:59:41Z")

</div>

Hi! This use-case makes sense. I think one potential challenge is parsing the events if they’re not emitted by a contract for which there is an ABI available (and potentially these logs could be emitted by any contract). Could potentially rely on some standard event signatures, though that isn’t foolproof. This could also potentially introduce the possibility of double counting, depending on the subgraph’s implementation logic, so would need to be handled with care.

@Leo is there any data availability challenge (i.e. would we always have the full set of logs for a given transaction?)

---

<div class="post-metadata">

**Author:** ![adamfuller](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@adamfuller](https://forum.thegraph.com/u/adamfuller)\
**Post date:** [October 22, 2021, 11:42am UTC](https://forum.thegraph.com/t/subgraph-list-logs-in-a-transaction-class/2573/3 "2021-10-22T11:42:59Z")

</div>

Hi! Caught up here, the challenge is log availability while indexing past blocks (via `eth_getLogs`) - the other logs aren’t available, so it would require another RPC call to fetch the receipt. We are moving towards firehose-driven indexing (see more on the Firehose here: [Introducing the Firehose](https://forum.thegraph.com/t/introducing-the-firehose/2329)), which will make this easier to do. The firehose has been integrated in Graph Node and we are currently testing with Ethereum indexing
