Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

internal/rpcprovider: implement RpcConnector class #49

Merged
merged 5 commits into from
Feb 23, 2022
Merged

Conversation

bleaker0x
Copy link
Contributor

RpcConnector preloads JsonRpcProvider instances for all defined
networks, fixing an issue where RPC providers could possibly be
reinstantiated over multiple calls for newProviderForNetwork.

Deprecations:
- internal/rpcproviders: newProviderForNetwork in favor of rpcProviderForNetwork

@bleaker0x bleaker0x added enhancement New feature or request non-breaking non-breaking changes (in theory) labels Feb 21, 2022
@coveralls
Copy link
Collaborator

coveralls commented Feb 21, 2022

Coverage Status

Coverage decreased (-1.2%) to 96.779% when pulling 175882c on rpcconnector into b4ad996 on dev.

@bleaker0x bleaker0x force-pushed the rpcconnector branch 3 times, most recently from dca2880 to 9f146d4 Compare February 21, 2022 06:46
@bleaker0x bleaker0x removed the request for review from BlazeWasHere February 21, 2022 06:47
@bleaker0x bleaker0x self-assigned this Feb 21, 2022
@bleaker0x bleaker0x force-pushed the rpcconnector branch 4 times, most recently from 8799038 to 0144138 Compare February 22, 2022 22:50
RpcConnector preloads JsonRpcProvider instances for all defined
networks, fixing an issue where RPC providers could possibly be
reinstantiated over multiple calls for newProviderForNetwork.

Deprecations:
	- internal/rpcproviders: newProviderForNetwork in favor of rpcProviderForNetwork
This function allows SDK users to set the SDK-global RPC URI for a given
chain.
Now we can do this sort of thing all over the place however we want.
Web3Connector now acts as an AbstractConnector for Web3 providers.
@bleaker0x bleaker0x merged commit 5221a99 into dev Feb 23, 2022
@bleaker0x bleaker0x deleted the rpcconnector branch February 23, 2022 00:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request non-breaking non-breaking changes (in theory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants