feat(tools): add soroban multi-network config loader, tests, CLI verifier, and docs#13
Merged
ayshadogo merged 1 commit intoDfunder:mainfrom Feb 20, 2026
Merged
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: #4
Summary
Adds a deterministic, strongly-typed Soroban network configuration system that resolves the
active network from environment variables and
soroban.tomlprofiles, with clear errorhandling, unit tests, and a small CLI verifier.
Files changed
soroban.toml.env.examplecrates/tools/src/config.rs(typed loader, errors, and tests)crates/tools/Cargo.toml(deps)crates/tools/src/main.rs(CLInetworkcommand)README.md(docs snippet)What it does
Config::load()with resolution order:SOROBAN_NETWORK,SOROBAN_RPC_URL,SOROBAN_NETWORK_PASSPHRASEsoroban.toml(testnet,mainnet,sandbox, or custom)ConfigErrorwhen ambiguous or missing required valuesNetworkenum and a strongly-typedConfigstruct for use by deploymentscripts and tests.
cargo run -p stellaraid-tools -- networkprints:Tests & verification
Included unit tests under
crates/tools:loads_profile_by_name— profile resolution (testnet)env_overrides_profile_values— env vars override profilemissing_required_values_returns_error— fails with typed error if required values missingloads_sandbox_profile— sandbox profileRun locally:
cargo test -p stellaraid-tools cargo run -p stellaraid-tools -- networkRationale
official Soroban CLI for editing/managing
soroban.toml.dotenvy,serde+toml, andthiserrorfor robust parsing and structured errors.Notes for reviewer
soroban.toml.If a
.envfile sits adjacent to the chosensoroban.toml, it will be loaded (allowingproject-local
.envoverrides)..env.examplecontains no secrets and documents override behavior.Commit
Next steps
To push and open a PR:
git push -u origin feat/Network # then open a PR on GitHub with this description