graphprotocol / graphprotocol/graph-node

[Feature] Internal native asset transfers

Abierto
#5,173 7 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

enhancement
Lenguaje dominante
Rust
Estrellas
3.2k
Forks
1.1k
Merge medio
4 d 1 h
PR fusionados (30 d)
1

Descripción

Description

Currently, there is no way to track internal native asset (ex. ETH) transfers inside of an event handler.

This is because internal transactions are not tracked. This is problematic for figuring out the correct flow of assets during an event.

Specifically, we ran into this issue when creating the 0x community subgraphs. Since internal native asset transfers cannot be tracked, it is not possible to index and assemble full 0x trades in a subgraph using the graph-node without call handlers (which are not supported everywhere).

Ideally, there would be an array of internal transactions as part of the transaction class, where each one would at least have the native asset amount that was transferred. I.e can access these in an event handler like: event.transaction.internalTransfers

For example, you can see internal transactions for a transaction in etherscan:
Screenshot 2024-01-29 at 15 51 20

Could use a feature flag to turn this on like the receipts flag is used today, so internal transactions are off by default speeding up indexing.

This was originally mentioned here (https://github.com/graphprotocol/graph-node/issues/297) in 2018, and was planned as part of "phase 2" but was never implemented.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out
  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza revisando la clase de transacción y el acceso a los manejadores de eventos descritos en este issue; después, inspecciona el feature flag existente de receipts y la discusión anterior en el issue #297. Define cómo deben representarse y exponerse las transferencias internas, cómo se habilita la indexación y qué pruebas demuestran que los flujos de activos nativos están completos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
blockchain
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.