Conversation
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 #58
🌐 Robust Multi-Network Configuration System for Soroban
Overview
Implements a production-grade, strongly-typed multi-network configuration system for deploying SkillSync contracts to Stellar's Soroban. Supports testnet, mainnet, and local sandbox with environment-driven configuration, comprehensive validation, and zero-compromise error handling.
What's Included
Configuration Files
✅ soroban.toml - Network profiles with descriptions
[profile.testnet]- Stellar Testnet configuration[profile.mainnet]- Stellar Mainnet configuration[profile.sandbox]- Local Soroban Sandbox configuration✅ .env.example - Safe template for environment variables
Rust Implementation
✅ crates/tools/src/config.rs (450+ lines)
Networkenum (Testnet, Mainnet, Sandbox)Configstruct with all required fieldsConfigErrortype (no panics)✅ crates/tools/src/lib.rs
✅ Updated crates/tools/src/main.rs
network showcommand - display active configurationnetwork listcommand - list available networksconfig --jsoncommand - JSON outputdeploy --network- runtime network overrideDocumentation
✅ SOROBAN.md (500+ lines)
✅ SOROBAN_CONFIG_TECHNICAL.md (600+ lines)
✅ SOROBAN_CONFIG_SUMMARY.md
Key Features
✅ Strongly Typed
Benefits:
✅ Environment-Driven Configuration
Priority order:
Environment variables:
SOROBAN_NETWORK- select networkSOROBAN_RPC_URL- override RPC endpointSOROBAN_NETWORK_PASSPHRASE- override passphraseSOROBAN_CONTRACT_ID- contract addressSOROBAN_ACCOUNT- signer accountSOROBAN_RPC_TIMEOUT_MS- request timeoutSOROBAN_DEBUG- enable debug logging✅ Production-Safe Error Handling
No unwrap() or expect():
thiserrorError types:
✅ Comprehensive Validation
✅ CLI Integration
✅ Testable
9 unit tests (all passing):
Implementation Quality
Build Status
Code Quality
Dependencies Added
All battle-tested, widely-used crates.
Usage Examples
For Users: Switch Networks
For Developers: Use as Library
For CI/CD: GitHub Actions
File Structure
Testing
CLI Commands Tested:
cargo run -p skillsync-tools -- network(default to show)cargo run -p skillsync-tools -- network showcargo run -p skillsync-tools -- network listcargo run -p skillsync-tools -- config --jsonAll tests pass with correct output:
Benefits
Next Steps
cargo run -p skillsync-tools -- network showexport SOROBAN_NETWORK=testnetDocumentation
Compatibility
Related Issues
Checklist
Category: Infrastructure / DevOps
Type: Feature
Breaking Changes: None
Verified: ✅ Builds, tests, and runs