-
Discord user ID.astro7. Describe your question in detail.I'm trying to index a large number of events one by one using the Aptos SDK. Right now, I'm storing how many events I've already processed and using that value as an offset in getModuleEventsByEventType. I also tried using the getEvents endpoint with filters (type and transaction_version) but it didn’t work at all. getModuleEventsByEventType does work, but when I attempt to index a contract that emits tons of events and use a large offset, I get an error—possibly because my RPC can’t handle it. I’m currently using BlastAPI as the fullnode endpoint in aptosConfig. Any suggestions on how to properly index these events without errors? Do I need a dedicated indexer endpoint, or is there a better approach? Thanks in advance What error, if any, are you getting?Cannot read properties of undefined (reading 'length') What have you tried or looked at? Or how can we reproduce the error?client.getModuleEventsByEventType({ Which operating system are you using?Windows Which SDK or tool are you using? (if any)TypeScript SDK Describe your environment or tooling in detail@aptos-labs/ts-sdk": "1.33.1" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
i don't recommend using the event api from ts-sdk, it's more performant to build your own indexer this case, i have a template for that |
Beta Was this translation helpful? Give feedback.
i don't recommend using the event api from ts-sdk, it's more performant to build your own indexer this case, i have a template for that
https://github.com/0xaptosj/aptos-full-stack-template