Get up and running with automated Soroban runtime guard deployment in 10 minutes.
- Soroban CLI installed
- Secret key obtained
- GitHub secrets configured (optional, for CI/CD)
- Environment configured
- First deployment successful
Generate a Soroban keypair:
soroban keys generate --seed test-deployer --network testnetFund your account on testnet:
ACCOUNT=$(soroban keys show test-deployer)
curl "https://friendbot.stellar.org?addr=$ACCOUNT"Get your secret key:
soroban keys show test-deployer --show-seed
# Output: SBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXcd /workspaces/Sanctifier
# Copy template
cp .env.example .env.local
# Edit with your secret key
nano .env.local
# Set this:
SOROBAN_SECRET_KEY=SBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX# Source environment
source .env.local
# Run dry run (no actual deployment)
./scripts/deploy-soroban-testnet.sh --dry-run
# Expected output:
# ✓ Environment validated
# [DRY RUN] Contract would deploy: C...# Deploy to testnet with validation
./scripts/deploy-soroban-testnet.sh --network testnet
# OR using CLI
sanctifier deploy contracts/runtime-guard-wrapper \
--network testnet \
--validate# View deployment manifest
cat .deployment-manifest.json | jq '.'
# Get contract ID
CONTRACT_ID=$(jq -r '.deployments[0].contract_id' .deployment-manifest.json)
# Verify health
soroban contract invoke \
--id "$CONTRACT_ID" \
--network testnet \
-- health_check# Normal deployment
./scripts/deploy-soroban-testnet.sh --network testnet
# Dry run (no actual deployment)
./scripts/deploy-soroban-testnet.sh --dry-run
# Without continuous validation
./scripts/deploy-soroban-testnet.sh --no-continuous
# Custom validation interval (10 minutes)
./scripts/deploy-soroban-testnet.sh --interval 600
# Enable debug logging
./scripts/deploy-soroban-testnet.sh --debug
# CLI deployment
sanctifier deploy contracts/runtime-guard-wrapper \
--network testnet \
--validate# Check deployment status
cat .deployment-manifest.json | jq '.deployments[0]'
# Health check
soroban contract invoke \
--id $CONTRACT_ID \
--network testnet \
-- health_check
# Get execution stats
soroban contract invoke \
--id $CONTRACT_ID \
--network testnet \
-- get_stats
# View logs
tail -f .deployment.loggh secret set SOROBAN_SECRET_KEY --body "YOUR_KEY_HERE"- Go to Actions tab
- Select "Soroban Runtime Guard Deployment"
- Click "Run workflow"
- Select network (testnet)
- Optional: Enable dry-run
gh workflow run soroban-deploy.yml \
-f network=testnet \
-f dry_run=falseFile: .deployment-manifest.json
{
"deployments": [
{
"contract_id": "CXXXXX...",
"name": "runtime-guard-wrapper",
"status": "active",
"deployed_at": "2026-02-25T12:34:56Z"
}
]
}File: .deployment.log
Contains detailed execution logs for debugging.
# Set environment variable
export SOROBAN_SECRET_KEY="SBXXXXXXX..."
# Or source .env.local
source .env.local# Install Soroban CLI
cargo install --locked soroban-cli# Build the contract
cargo build -p runtime-guard-wrapper \
--release \
--target wasm32-unknown-unknown# Check network
soroban network info --network testnet
# Check balance
soroban account balance --account $SOROBAN_ACCOUNT_ID --network testnet-
Monitor Deployment
- Check logs:
tail -f .deployment.log - Verify health: See Verification commands
- Check logs:
-
Continuous Validation
- Deployment runs validation automatically
- Check stats every N seconds (configurable)
- Results saved to manifest
-
GitHub Actions
- Add SOROBAN_SECRET_KEY secret
- Workflow triggers on push to main
- Runs validation every 6 hours
-
Production Setup
- Review CI/CD Setup Guide
- Configure branch protection
- Set up production networks
✅ Test First
./scripts/deploy-soroban-testnet.sh --dry-run✅ Keep Track
# Archive old manifests
mv .deployment-manifest.json "manifest-$(date +%s).json"✅ Monitor Regularly
# Watch logs during deployment
watch -n 1 'tail -5 .deployment.log'✅ Rotate Credentials
# Periodically update your secret key
gh secret set SOROBAN_SECRET_KEY --body "NEW_KEY_HERE"After successfully deploying:
- ✅ Review deployment manifest
- ✅ Check health status
- ✅ Monitor validation loop
- ✅ Set up GitHub Actions (optional)
- ✅ Configure branch protection (production)
- ✅ Plan continuous validation schedule
Last Updated: February 25, 2026 Time to Deploy: ~5 minutes Difficulty: ⭐ Easy