Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add waitAsRateLimit option on http transport #3698

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

Open
iyarsius wants to merge 5 commits into wevm:main
base: main
Choose a base branch
Loading
from iyarsius:main

Conversation

Copy link

@iyarsius iyarsius commented Jun 4, 2025
edited
Loading

This PR introduces an option to enable a batch queue system by setting batch.waitAsRateLimit to true. I was searching for a solution until I discovered #1305, which motivated me to explore ways to update the HTTP client.

The core idea is to modify the batchScheduler by changing the shouldSplitBatch parameter to a getBatchSize parameter. Once the scheduler can determine the batch size, it becomes capable of queuing requests.
I also updated multicall to utilize getBatchSize with behavior similar to the previous version.

The main drawback is that if too many requests are queued, the queue could continuously grow, potentially causing delays or triggering cache limits. I have added a warning about this in the documentation.

Therefore, for users interacting with rate-limited endpoints, this option could be extremely beneficial for managing such interactions.

jxom reacted with heart emoji
Copy link

changeset-bot bot commented Jun 4, 2025
edited
Loading

⚠️ No Changeset found

Latest commit: f7e6714

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Jun 4, 2025

@iyarsius is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom changed the title (削除) Added waitAsRateLimit option on http transport (削除ここまで) (追記) feat: add waitAsRateLimit option on http transport (追記ここまで) Jun 5, 2025
Copy link
Member

jxom commented Jun 5, 2025

Thanks, will review!

iyarsius reacted with thumbs up emoji

@tmm tmm force-pushed the main branch 3 times, most recently from 129b947 to 9ad3509 Compare September 19, 2025 19:48
@jxom jxom force-pushed the main branch 2 times, most recently from d78cf00 to b31cf2a Compare October 7, 2025 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /