Skip to content

Conversation

@fengtality
Copy link
Contributor

Summary

Adds optional defaultNetworks array to Solana and Ethereum chain configs to allow specifying which networks to query for balance operations. This optimizes performance by avoiding queries to all 9+ networks when only 1-2 are needed.

Closes #581

Changes

  • Add defaultNetworks to chain schemas (solana-chain-schema.json, ethereum-chain-schema.json)
  • Set additionalProperties: true for backwards compatibility
  • Add defaultNetworks?: string[] to SolanaChainConfig and EthereumChainConfig interfaces
  • Update config getter functions to include defaultNetworks
  • Add commented examples in template files (solana.yml, ethereum.yml)

Configuration Example

defaultNetwork: mainnet
defaultNetworks:
  - mainnet
  - base

Backwards Compatibility

  • defaultNetworks is optional - if not specified, behavior is unchanged
  • additionalProperties: true ensures existing configs work without modification
  • defaultNetwork remains the primary config for single-network operations

Test plan

  • Verify typecheck passes
  • Verify /config?namespace=ethereum returns defaultNetworks field
  • Verify existing configs without defaultNetworks still work

🤖 Generated with Claude Code

Adds optional defaultNetworks array to Solana and Ethereum chain configs
to allow specifying which networks to query for balance operations. This
optimizes performance by avoiding queries to all 9+ networks when only
1-2 are needed.

Changes:
- Add defaultNetworks to chain schemas with additionalProperties: true
  for backwards compatibility
- Add defaultNetworks to SolanaChainConfig and EthereumChainConfig interfaces
- Update config getter functions to include defaultNetworks
- Add commented examples in template files

Closes #581

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rapcmia rapcmia changed the title Add defaultNetworks parameter to chain configs feat / Add defaultNetworks parameter to chain configs Jan 5, 2026
@fengtality fengtality added this to the v2.13 milestone Jan 5, 2026
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.

3 participants