This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Fix: Update logic to sync UniswapV3 pool from swap log #88
Labels
bug
Something isn't working
Comments
Yeh I also found a couple issues with this function as well, I will see if I can fix it and make a PR. I fixed most of it but I cant seem to get the tick value on any log that I decode with the topic of "Swap(address,address,int256,int256,uint160,uint128,int24)" |
so weird when I use into_int and then print the tick out it is way larger than an int24 size.
this is one of the examples so I cannot convert it into an i32 |
Thanks for the update and sorry for the delay in response (its been very busy recently!). I will be able to check this out early this week. |
no worries, I think it is a problem with the ethers library instead of your logic so i have reached out to gakonst |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now, the current logic is getting the
amount_0
andamount_1
fromlog_data[1]
. This is incorrect as theamount_0
should be retrieved fromlog_data[0]
. All logic used to sync pools from logs should be checked and updated. Additionally, logic decoding logs should ensure that indexed arguments are handled correctly and not assumed to be in log data.Snippet for reference
The text was updated successfully, but these errors were encountered: