Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: include viem chains rpcs #13

Merged
merged 5 commits into from
Jul 15, 2024
Merged

feat: include viem chains rpcs #13

merged 5 commits into from
Jul 15, 2024

Conversation

eliobricenov
Copy link
Contributor

No description provided.

const viemChain = viemChainsMap[metadata_i.chainId];

if (viemChain) {
metadata_i.rpc = [...viemChain.rpcUrls.default.http, ...metadata_i.rpc]
Copy link
Contributor

Choose a reason for hiding this comment

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

wondering if we should just supply the viem chain rpc's only if they exist since the ethereum-list ones are so flaky

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't the non viem rpcs are necessarily incorrect, so I don't see any reason to not include them

One thing we can do is filter out the rpcs that need API keys like https://mainnet.infura.io/v3/${INFURA_API_KEY}, which is present in a couple of chains

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good. I'm okay with including both. as long as we know to start from the front of the array.

we have options to pass the infura or alchemy api get in the getChainMetadata params and it will replace those api keys and return a useable RPC url

@BrettCleary BrettCleary self-requested a review July 15, 2024 20:47
@eliobricenov eliobricenov merged commit 1fed7b5 into main Jul 15, 2024
1 check passed
@eliobricenov eliobricenov deleted the viem-chains branch July 15, 2024 22:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants