-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Extending the ethereum.Transaction
to contain all logs
#3218
Comments
Thanks @schmidsi! Discussed with @tilacog, this information is available on the transaction receipt. I think we would want to fetch this information conditionally (based on the needs of the subgraph developer), so maybe we could introduce a new function
This would require a new I believe that if this is quite a "quick win" there is value in supporting receipts with RPC indexing (rather than waiting for the Firehose, as not all EVM chains will have firehose support immediate). |
One question that comes to my mind would be how to parse the |
Yes - I think we can leverage the ABIs that we already have (which are used currently for |
Making this a host fn is more flexible, but for performance it would be best for this to be declared in the manifest so it can be fetched in the block stream. This also fits more naturally firehose, which streams the data according to the manifest. @fordN once implemented this for block handlers in #1761. |
Should we aim at resuming Ford's previous work, or would it be better to implement access to receipts via a host function? I agree with @leoyvens that the former seems to improve the current design and can be a more strategic move in the long term. Considering Ford's PR, maybe we could promote the manifest's block |
Agree that this could be specified in the manifest, but I think the priority here is to fetch the receipt for the specific transaction which emitted the event, rather than all the receipts in the block - if they're not in the cache, that could be a lot of unnecessary rpc calls. |
It wasn't clear to me from the OP if the use case is for all receipts in a block or for the receipts associated to an event's transaction. Still that doesn't mean it must be a host fn, the event handler in the manifest could specify that it needs all receipts for its transaction. Our block cache structure assumes that either all receipts for a given block are cached, or none are. Having it support caching receipts for individual transactions is tricky, introducing a separate cache might be the safest path. |
We have agreed on using the new eventHandlers:
event: Transfer(address,address,uint256)
handler: myEventHandler
receipt: true Where
Having said so, here is the proposed roadmap to implement this feature concerning
We understand that having a transaction receipt cache is also desired, but it is out of the scope of this task. We could track its discussion and development in a separate issue. |
To answer @leoyvens question: It is about to retrieve all receipts associated to an event's transaction. |
What is the current behavior?
Currently, the
ethereum.Transaction
type only exposes the following values:It would be great if there would also be a possibility to also access all the logs. Something like:
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:
The text was updated successfully, but these errors were encountered: