Skip to content

Feature request: Extending the ethereum.Transaction to contain all logs #3218

Closed
@schmidsi

Description

@schmidsi

What is the current behavior?
Currently, the ethereum.Transaction type only exposes the following values:

  /**
   * An Ethereum transaction.
   */
  export class Transaction {
    constructor(
      public hash: Bytes,
      public index: BigInt,
      public from: Address,
      public to: Address | null,
      public value: BigInt,
      public gasLimit: BigInt,
      public gasPrice: BigInt,
      public input: Bytes,
      public nonce: BigInt,
    ) {}
  }

It would be great if there would also be a possibility to also access all the logs. Something like:

  /**
   * An Ethereum transaction.
   */
  export class Transaction {
    constructor(
      public hash: Bytes,
      public index: BigInt,
      public from: Address,
      public to: Address | null,
      public value: BigInt,
      public gasLimit: BigInt,
      public gasPrice: BigInt,
      public input: Bytes,
      public nonce: BigInt,
      public events: Event[] // To contain all events
    ) {}
  }

This would for example enable the possibility to write a subgraph that tracks the actual sale price of NFTs by looking at the ERC20 token Transfers from buyer to seller.

I know that the Firehose will enable this but adding this issue here for tracking since a lot of folks are requesting this feature.

Prior art:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions