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

Switch to StaticJsonRpcProvider #404

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

mikeki
Copy link
Contributor

@mikeki mikeki commented Nov 3, 2023

From this issue in ethers: ethers-io/ethers.js#901

We can switch to using the StaticJsonRpcProvider which avoids an unnecessary chainId call to infura, saving about 30% of requests to infura

Copy link

@zzmp zzmp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not obvious to me that this provider will only ever be used for the chain for which it is initialized. Is that true? You can also pass in add'l info in initializing to prevent it calling to the chain for chainInfo.

@mikeki mikeki merged commit 87b6a5c into main Nov 3, 2023
3 checks passed
@mikeki mikeki deleted the mikeki/switch_to_static_json_rpc_provider branch November 3, 2023 18:24
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.

4 participants