getPastEvents in Avalanche

When connecting to Avalanche network via web3 library, I am to get all past events from block 0 to latest block, but I am getting error.
Then, if I specify a very narrow range of blocks, I am able to retrieve the data.
Is there a way to retrieve the full events history? I did not have any issue in Ethereum using Infura nodes, but now I am facing this issue in Avalanche…

1 Like

there is a limit of maximum 2k nodes interval when getting the events with a speedy node

I join! In my topic, I described that the same problem appeared about 10 days ago. I using BSC network.

My topic:

Maybe you mean 2k blocks? If so, is there any technical solution I can apply to retrieve the full history of Events as I do on the Ethereum network?

Yes, I wanted to say blocks instead of nodes

Do you know any solution to this problem? In Ethereum all was good using Infura, but in Avalanche I don’t know how to retrieve the full Event history…

You can use sync event functionality from a server if there are not millions of events that you want to get and you are searching for a specific event from a specific contract

I need to track 5-6 events from 2 specific contracts, having its full history. Does it make sense then to use this sync functionality? When I am asked to fulfill topic, do I need to fulfill the Event name? Then it means I need to connect to this server instead of a speedy node?

you can configure on server all those 5-6 events, topic is same thing as the event topic, after that you can read the events by connecting to the server in some way (directly connecting to mongo db, using the SDK, some hooks)