Closed
Description
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 Transfer
s 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