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

feat(client): reuse JSON RPC providers #2497

Merged
merged 5 commits into from
Apr 15, 2024
Merged

feat(client): reuse JSON RPC providers #2497

merged 5 commits into from
Apr 15, 2024

Conversation

harbu
Copy link
Contributor

@harbu harbu commented Apr 10, 2024

Summary

Reduce the amount of eth_chainId calls made by reusing Provider instances.

Future improvements

  • Implement a getPrimaryProvider method to RpcProviderFactory
  • Inline createNewInstantiateContractsFn into ERC1271ContractFacade by utilizing injected RpcProviderFactory
  • Should we move getEthersOverrides to a method? Or make curried? (current 2-argument solution is not that nice)

Checklist before requesting a review

  • Is this a breaking change? If it is, be clear in summary.
  • Read through code myself one more time.
  • Make sure any and all TODO comments left behind are meant to be left in.
  • Has reasonable passing test coverage?
  • Updated changelog if applicable.
  • Updated documentation if applicable.

@harbu harbu requested a review from teogeb April 10, 2024 13:21
@github-actions github-actions bot added the client Related to Client Package label Apr 10, 2024
@harbu harbu merged commit dc0a7fd into main Apr 15, 2024
23 checks passed
@harbu harbu deleted the reuse-provider-instances branch April 15, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Related to Client Package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants