Summary
The deployContract function is hardcoded to deploy to Stellar Testnet with no way to switch networks. There is no UI for selecting the target network, and no environment variable support for configuring the RPC URL.
Problem
- Deployment target is implied (Testnet) but not displayed or configurable.
- Developers cannot switch to Mainnet without modifying source code.
- There is no guard preventing accidental Mainnet deployments.
Expected Behaviour
- A network selector dropdown (Testnet / Mainnet) is visible in the editor toolbar or header.
- The current network is always clearly indicated (e.g. a coloured badge: green = Testnet, orange = Mainnet).
- Switching to Mainnet shows a confirmation dialog warning that real XLM will be spent.
- The selected network is stored in application state and passed to
deployContract.
- The RPC endpoint URL is derived from the selected network (configurable via
NEXT_PUBLIC_STELLAR_NETWORK env var as a fallback).
Acceptance Criteria
References
src/lib/stellar/deploy.ts
src/components/editor/DeployButton.tsx
- Stellar network passphrases:
Networks.TESTNET, Networks.PUBLIC in @stellar/stellar-sdk
Summary
The
deployContractfunction is hardcoded to deploy to Stellar Testnet with no way to switch networks. There is no UI for selecting the target network, and no environment variable support for configuring the RPC URL.Problem
Expected Behaviour
deployContract.NEXT_PUBLIC_STELLAR_NETWORKenv var as a fallback).Acceptance Criteria
NetworkSelectorcomponent renders a dropdown with options:TestnetandMainnet.deployContractaccepts anetworkparameter and uses the corresponding RPC URL.NEXT_PUBLIC_STELLAR_NETWORKenv var can override the RPC URL for custom/private networks.References
src/lib/stellar/deploy.tssrc/components/editor/DeployButton.tsxNetworks.TESTNET,Networks.PUBLICin@stellar/stellar-sdk