Fetch only stablecoins, Add Avalance, BNB, Celo, Gnosis, zkSync support#13
Open
timjrobinson wants to merge 3 commits intomainfrom
Open
Fetch only stablecoins, Add Avalance, BNB, Celo, Gnosis, zkSync support#13timjrobinson wants to merge 3 commits intomainfrom
timjrobinson wants to merge 3 commits intomainfrom
Conversation
Contributor
timjrobinson
commented
Jul 28, 2025
- Adds support for paying with tokens on Avalance, BNB, Celo, Gnosis, and zkSync
- Fetches only Stablecoins from Alchemy to speed up requests
- Refactor config into the same spot, and place supported chains and tokens in their own files
Major improvements to token fetching and chain support: Token Fetching: - Created tokens.ts configuration for supported stablecoins (USDC, USDT, DAI) - Updated AlchemyService to only fetch configured tokens instead of all tokens - Removed unnecessary metadata API calls for better performance - Fixed native token pricing to use correct prices (MATIC, BNB, AVAX, etc.) New Chains Added: - BNB Chain (BSC) - Chain ID 56 - Avalanche - Chain ID 43114 - Gnosis - Chain ID 100 - Celo - Chain ID 42220 - zkSync Era - Chain ID 324 Configuration Consolidation: - Enhanced ChainConfig interface with all chain properties - Added centralized helper functions for chain lookups - Removed duplicate network mappings across services - Created O(1) lookup maps for better performance - Single source of truth for all chain configurations This significantly improves performance by only fetching ~3 tokens per chain instead of potentially hundreds, and makes adding new chains much easier. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Extracted SUPPORTED_CHAINS array and related types/functions to chains.ts - Kept all chain configuration logic in a dedicated module - Improved code organization and separation of concerns - No functional changes, purely organizational refactoring 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.