feat: Stellar network configuration (testnet/mainnet)#73
Open
Elite-tch wants to merge 4 commits intoCalloraOrg:mainfrom
Open
feat: Stellar network configuration (testnet/mainnet)#73Elite-tch wants to merge 4 commits intoCalloraOrg:mainfrom
Elite-tch wants to merge 4 commits intoCalloraOrg:mainfrom
Conversation
Contributor
|
please resolve the conflicts |
Author
|
done |
Contributor
|
@Elite-tch Can you resolve the conflicts? |
Author
|
please i have resolve the issue . and please can you check my pr , i first created pr but you have been merging other peoples pr which have been causing conflict on my own , is actually unfair . please consider checking my pr before another conflict thanks |
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.
Description
This PR implements multi-network support for Stellar and Soroban, allowing the backend to switch between testnet and mainnet via environment variables.
Changes
Dynamic Config: Added
src/config.ts
to handle network detection via STELLAR_NETWORK or SOROBAN_NETWORK.
Client Initialization: Created
src/lib/stellar.ts
to initialize Horizon and Soroban RPC servers based on the active network.
Contract Mapping: Configured separate Vault and Settlement contract IDs per network.
API Updates: Updated health check endpoint to report current network status.
Documentation: Added
.env.example
and updated
README.md
with environment variable details.
Environment Variables
STELLAR_NETWORK: testnet (default) or mainnet.
Network-specific overrides for RPC URLs and Contract IDs (e.g., TESTNET_VAULT_CONTRACT_ID, MAINNET_RPC_URL).
Verification
Verified via GET /api/health that the service correctly switches URLs and network passphrases when the environment variable is toggled.
close issue #57