Skip to content

Use getLogs directly instead of creating a filter and querying it #312

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

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

vigneshka
Copy link
Collaborator

@vigneshka vigneshka commented Mar 11, 2024

Looks like an unintended change introduced in the ether to viem port for legacy sdk,
Creating an event filter on the node, and then querying it as 2 steps is unnecessary and has perf issues (causing timeouts in alchemy)

Instead ofcreateEventFilter and getFilterLogs,
we can use getLogs and pass the event filters with the call, and get typesafe results

Copy link

changeset-bot bot commented Mar 11, 2024

🦋 Changeset detected

Latest commit: a5475ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@soundxyz/legacy-sdk Minor
@soundxyz/sdk Minor
soundxyz-sdk-nextjs-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Mar 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
sdk-nextjs-example ✅ Ready (Inspect) Visit Preview Mar 11, 2024 3:29am

@vigneshka vigneshka marked this pull request as ready for review March 11, 2024 03:31
@vigneshka vigneshka requested review from PabloSzx and saihaj March 11, 2024 03:31
@vigneshka vigneshka merged commit 079f3d5 into main Mar 11, 2024
@vigneshka vigneshka deleted the vigneshka/use-get-logs branch March 11, 2024 17:30
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

Successfully merging this pull request may close these issues.

2 participants