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

Websocket !! #38

Open
RostislavStoliarchuk opened this issue Apr 21, 2023 · 10 comments
Open

Websocket !! #38

RostislavStoliarchuk opened this issue Apr 21, 2023 · 10 comments

Comments

@RostislavStoliarchuk
Copy link

RostislavStoliarchuk commented Apr 21, 2023

I need help, I've been hammering for a week and I don't understand.

For example, there are 3 Websocket providers.

  • getblock
  • ankr
  • quicknode

BSC only works from getblock.

The question is, what's wrong with others?

Their statistics work, they show requests but do not load the pools, the eternal load comes out. Why ?

@iv7dev
Copy link

iv7dev commented Apr 21, 2023

same problem.

@RostislavStoliarchuk
Copy link
Author

I think it's a problem in the code. Or rather, some narrow variables that have an orientation to a specific websocket. In any case, you need clarification from the main developer.

@iv7dev
Copy link

iv7dev commented Apr 22, 2023

I'll tell you any news.

@RostislavStoliarchuk
Copy link
Author

I'll tell you any news.

Hello! I ran into a problem with Websocket. Getblock works, but ankr, quicknode, alchemy don't. They issue status 200 and 413 on requests. What could be the problem?

@RostislavStoliarchuk
Copy link
Author

#6

@iv7dev
Copy link

iv7dev commented Apr 24, 2023

where do you put the websocket url? in the frontend or in the settings you save in the store contract? and another question, do you put https or wss?
I am using alchemy and it does not indicate an error. btw i am doing it over mumbai testnet (polygon)

@VitaliyShulik
Copy link
Owner

Hi guys, unfortunately, I don't have time to support this app at the moment...

The problem with the long loading of pools is that the application starts to listen for the IDOCreated event of the IDOFactory contract, and if you start listening from block 0, then the application will start checking every 1000 blocks, in turn, and will show pools only when syncing up with the latest block, so for this, you need to set fromBlock to the height of the factory creation to reduce IDOPools loading time.

In theory, the problem with some types of WS services is that they don't provide historical nodes to get info from blocks of historical data.

The solution to this problem can be to create a subgraph of the contract, which will map it on the side of the graph node, and the application will simply pull data from the API.

@iv7dev
Copy link

iv7dev commented Apr 24, 2023

hello! Thanks for answering, I have the fromBlock parameter set. the question is whether to use an http or wss websocket and where. beyond the new solution. thank you and i hope you are well

@VitaliyShulik
Copy link
Owner

VitaliyShulik commented Apr 24, 2023

I'm alright, thanks.

You need to set the HTTP RPC node only in the networksInfo.js config in the app source code and set the WS RPC node only in the admin panel on the app client side.

@iv7dev
Copy link

iv7dev commented Apr 24, 2023

So I have it configured correctly. it was to confirm. Thank you very much!! and I hope you can help us. When the launchpad starts working I will make a donation.
Thank you again.

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

3 participants