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

too many eth_chainId calls #356

Closed
maraoz opened this issue Oct 9, 2021 · 3 comments · Fixed by #800
Closed

too many eth_chainId calls #356

maraoz opened this issue Oct 9, 2021 · 3 comments · Fixed by #800

Comments

@maraoz
Copy link

maraoz commented Oct 9, 2021

I noticed the following in my infura stats:
image

Googling around I found that it seems to be related to JsonRpcProvider, from which Web3Provider inherits. Is there any way to use a custom ethers Provider in useDapp? both StaticJsonRpcProvider and InfuraProvider seem to solve this problem, but it was not clear if this could be changed as a useDapp user.

Thanks!

@maraoz
Copy link
Author

maraoz commented Oct 9, 2021

My bad, it was a problem with a script that was using the same infura id, not useDapp. Closing

@maraoz maraoz closed this as completed Oct 9, 2021
@maraoz
Copy link
Author

maraoz commented Oct 11, 2021

Reopening, I moved scripts to another infura id and I'm still getting one eth_chainId call for every call in my dapp. We should probably investigate this further, as it could mean extra calls and delays for all dapps using useDApp.

@maraoz maraoz reopened this Oct 11, 2021
@jhirn
Copy link

jhirn commented Nov 16, 2021

Also very curious about this. Will do some digging on my own or at least try to apply the patch referred to in ethers-io/ethers.js#901

Feel like this should be an easy if not auto-detectable config change.

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 a pull request may close this issue.

3 participants