graphprotocol / graphprotocol/graph-node
[Feature] Internal native asset transfers
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Rust
- Star
- 3.2k
- Fork
- 1.1k
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
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:
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng việc xem xét lớp giao dịch và quyền truy cập vào trình xử lý sự kiện được mô tả trong issue này, sau đó kiểm tra feature flag receipts hiện có và cuộc thảo luận trước đó trong issue #297. Xác định cách các giao dịch chuyển nội bộ phải được biểu diễn và cung cấp, cách bật việc lập chỉ mục, và các bài kiểm thử nào chứng minh rằng các luồng tài sản gốc đã hoàn chỉnh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- blockchain
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100