Add Stellar testnet/mainnet environment switching without code changes#262
Open
osasfaith wants to merge 1 commit into
Open
Add Stellar testnet/mainnet environment switching without code changes#262osasfaith wants to merge 1 commit into
osasfaith wants to merge 1 commit into
Conversation
- Add STELLAR_NETWORK-based RPC URL derivation with env var overrides - Add startup validation for network/keypair consistency - Log active network prominently at startup - Update .env.example to reflect optional STELLAR_RPC_URL - Add unit tests for network configuration Closes Neurowealth#238
|
@osasfaith Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #238
Type of Change
Summary
This PR adds a single
STELLAR_NETWORKenv var that automatically derives the RPC URL, passphrase, and explorer URL for testnet/mainnet/futurenet without requiring multiple environment variable changes. The RPC URL defaults to the official Stellar Soroban endpoint for the configured network, with optional overrides viaSTELLAR_RPC_URLfor custom nodes.Motivation / Context
Switching between Stellar testnet and mainnet currently requires changing multiple environment variables manually with no validation that the full set is consistent. A misconfiguration (testnet key against mainnet RPC) could be catastrophic. This PR consolidates network configuration into a single
STELLAR_NETWORKvariable with startup validation.Closes #238