Skip to content
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

How to subscribe to native eth transfer log? #277

Open
3tbraden opened this issue Oct 12, 2021 · 1 comment
Open

How to subscribe to native eth transfer log? #277

3tbraden opened this issue Oct 12, 2021 · 1 comment

Comments

@3tbraden
Copy link

Hi team! I am trying to subscribe to native ETH transfer log such as the ones here: https://etherscan.io/tx/0x7357f1f0885811b2888dad7e7b1aa0f3016c7b0f8a179e37e463d5e941889bab#eventlog under topics[0]: 0x7d2476ab50663f025cff0be85655bcf355f62768615c0c478f3cd5293f807365

I am wondering where I can find the event associated with this log? I am trying to unpack the event but it does not have an event name. Is this an anonymous event and how can I subscribe to the event properly?

One way that I can think of is to get all the other indexed topics under the above topics[0] but I really want to know if there's a standard way to do this with abi unpacking the event?

@3tbraden
Copy link
Author

Ah I think I have mistaken sth, apparently Unpack is used on log.Data but here the data are indexed topics. So I don't need to unpack the event? And the proper way to subscribe to this is to filter topics[0]: 0x7d2476ab50663f025cff0be85655bcf355f62768615c0c478f3cd5293f807365? I would really appreciate if you can point me to the code/event for this please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant