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

indexer-common: Support connecting to any protocol network #513

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

fordN
Copy link
Contributor

@fordN fordN commented Oct 18, 2022

To support connecting to providers for any network I am updating the handling of the ethereum-network argument on startup. If ethereumNetwork name not provided the provider will use network = 'any'. This change effectively adds support for non-standard networks with unknown names like arbitrum-goerli, etc.... The user may still specify a network name if they know it: i.e "mainnet" which provides an extra check that the provider is connecting to the correct network.

While in there I also moved the code to connect to the network provider to a shared indexer-common function for usage by both indexer-agent and indexer-service.

@fordN fordN requested a review from hopeyen October 18, 2022 17:10
- If ethereumNetwork name not provided fallback to 'any', to support
non-standard networks with unknown names like arbitrum-goerli, etc...
- Move network provider connection establishment to a shared
indexer-common function for usage by indexer-agent and indexer-service
@fordN fordN force-pushed the ford/network-provider-support-all-chains branch from d6ad978 to b23bf62 Compare October 18, 2022 17:16
Copy link
Contributor

@hopeyen hopeyen left a comment

Choose a reason for hiding this comment

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

the refactoring looks great 👍

@fordN fordN merged commit fc5dd8f into main Oct 19, 2022
@fordN fordN deleted the ford/network-provider-support-all-chains branch October 19, 2022 15:47
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.

2 participants