Linch1 / WeChartWeb3

Build a poocoin clone, scrape all the prices from pancakeswap or any other similar dex, build an historical record and offer an api to your users.
119 stars 77 forks source link

Question #3

Closed Sv3nskie closed 2 years ago

Sv3nskie commented 2 years ago

Hey Linch1,

Thanks for sharing your code, I am building an own version and basically its almost done. I have a question about the pancakeswap functions, as I checked your code it seems that your code is only interested in 6 out of the 9 swap functions of the router contract. And I checked bsc and see the missing 3 functioms are used, but I do not fully understand if they are needed. Maybe we can get in touch if you have a few minutes spare time?

Linch1 commented 2 years ago

Hey, i'm refactoring a bit the code since it was not really as good as i thought, i've already published a refaactoring of the scraper, now instead scraping each transaction block it listen for swap events

not only it is more efficient but it has a wider range of charting possibilities

if you want feel free to reach me on reddit https://www.reddit.com/user/Linch-1 :)

Sv3nskie commented 2 years ago

Thanks for the reply, I indeed saw you subscribing to logs instead to blockheaders. Could you let me know from where you have the info of that?

I already made a system to create candlestick data, I only a bit confused about what to do with some transactions.

As now I start getting reserves for each pair and later calculate mew price after transaction. I want to try to use your log subscription if thats faster. Not sure if logs have a deley.

On Thu, 3 Mar 2022, 04:44 Linch1, @.***> wrote:

Hey, i'm refactoring a bit the code since it was not really as good as i thought, i've already published a refaactoring of the scraper, now instead scraping each transaction block it listen for swap events

not only it is more efficient but it has a wider range of charting possibilities

if you want feel free to reach me on reddit https://www.reddit.com/user/Linch-1 :)

— Reply to this email directly, view it on GitHub https://github.com/Linch1/Web3TokenCharting/issues/3#issuecomment-1057422398, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD56KIZDJMN42NQLN7XFYKLU57OKFANCNFSM5PTZUEWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

lordmen99 commented 2 years ago

Any demo this script online? i want see it

Linch1 commented 2 years ago

@lordmen99 there aren't demo about this at the moment, actually i uploaded a frontend implementation for this, you can checkout it at https://github.com/Linch1/Web3TokenChartingDemo

There are some screen of this working