Skip to content

feat: Stellar network configuration (testnet/mainnet)#73

Open
Elite-tch wants to merge 4 commits intoCalloraOrg:mainfrom
Elite-tch:feature/network-config
Open

feat: Stellar network configuration (testnet/mainnet)#73
Elite-tch wants to merge 4 commits intoCalloraOrg:mainfrom
Elite-tch:feature/network-config

Conversation

@Elite-tch
Copy link

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

image image

@greatest0fallt1me
Copy link
Contributor

please resolve the conflicts

@Elite-tch
Copy link
Author

done

@greatest0fallt1me
Copy link
Contributor

@Elite-tch Can you resolve the conflicts?

@Elite-tch
Copy link
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

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.

2 participants