This directory holds the canonical source of truth for Lafiya's Soroban network parameters and contract IDs.
networks.toml- per-network RPC endpoints, passphrases, and deployed contract IDs.
[testnet]
rpc_url = "https://soroban-testnet.stellar.org"
network_passphrase = "Test SDF Network ; September 2015"
[testnet.contracts]
attester_registry = "C..."
attestation_registry = "C..."| Name | RPC URL | Passphrase | Use |
|---|---|---|---|
local / standalone |
http://localhost:8000/soroban/rpc |
Standalone Network ; February 2017 |
Local dev via stellar/quickstart |
testnet |
https://soroban-testnet.stellar.org |
Test SDF Network ; September 2015 |
Pre-alpha testnet deployment |
futurenet |
https://rpc-futurenet.stellar.org |
Test SDF Future Network ; October 2022 |
Future protocol testing |
mainnet |
https://mainnet.sorobanrpc.com |
Public Global Stellar Network ; September 2015 |
Production (post-audit) |
Never store in this file:
- Private keys
- Mnemonics / seed phrases
- Deployer secret keys
- API keys
This file is committed to git and must contain only public data. Secrets are passed via environment variables or stellar CLI identity management:
# Deployer identity is managed by stellar-cli, not this file
stellar keys generate deployer --network testnet
# or use env:
export STELLAR_DEPLOYER_SECRET_KEY="S..."All tooling uses --network <name> which reads from this config:
./scripts/deploy.sh --network testnet
./scripts/admin.sh --network testnet list-attesters
cargo run -p lafiya-cli -- --network testnet config show
cargo run -p lafiya-cli -- --network testnet attester is C...GABCRust:
use lafiya_config::{load_networks, get_network};
let networks = load_networks(None)?; // auto-discovers config/networks.toml
let testnet = get_network(&networks, "testnet")?;
println!("RPC: {}", testnet.rpc_url);Shell (bash): scripts/lib/config.sh is the shared loader:
source ./scripts/lib/config.sh
load_network_config "testnet"
echo "$LAFIYA_RPC_URL"
echo "$LAFIYA_NETWORK_PASSPHRASE"
echo "$LAFIYA_ATTESTER_REGISTRY_ID"The shell loader uses python3 with tomllib/tomli to parse TOML robustly — no hardcoded values.
- Add a new table in
networks.toml:[mynewnet] rpc_url = "https://..." network_passphrase = "..." [mynewnet.contracts] attester_registry = "" attestation_registry = ""
- No code change needed —
--network mynewnetworks everywhere.
After ./scripts/deploy.sh --network testnet, copy the output contract IDs into networks.toml:
[testnet.contracts]
attester_registry = "CA6P..."
attestation_registry = "CB2X..."Commit the updated networks.toml — contract IDs are public.