This document provides a complete reference for all configuration options available when deploying runtime guard wrapper contracts.
- Environment Variables
- Deployment Script Options
- CLI Tool Options
- GitHub Actions Configuration
- Validation Configuration
The secret key for your Soroban account (wallet).
export SOROBAN_SECRET_KEY="SBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"- Format: Base32-encoded secret key starting with
S - Required: Yes, for production deployments
- Security: Store in
.env.local(not version controlled) or GitHub Secrets - How to get:
soroban keys generate --seed <name> --network testnet soroban keys show <name> --reveal
The blockchain network to use.
export SOROBAN_NETWORK=testnet- Values:
testnet,futurenet,mainnet - Default:
testnet - Recommended:
testnetfor development
Custom RPC endpoint URL (advanced users).
export SOROBAN_RPC_URL=https://soroban-testnet.stellar.org- Default: Auto-detected based on SOROBAN_NETWORK
- Custom: Use for private/custom RPC endpoints
RPC request timeout in seconds.
export SOROBAN_RPC_TIMEOUT=30- Default:
30 - Range:
10-300 - Use: Increase if experiencing timeout issues
Enable debug logging for troubleshooting.
export DEBUG=true- Values:
true,false - Default:
false - Output: Verbose logging to console and logs
Logging level for deployment process.
export LOG_LEVEL=debug- Values:
debug,info,warning,error - Default:
info
Specify target blockchain network.
bash scripts/deploy-soroban-testnet.sh --network testnet- Options:
testnet,futurenet,mainnet - Default:
testnet - Required: No
- Example: Deployed to futurenet:
--network futurenet
Skip validation after deployment.
bash scripts/deploy-soroban-testnet.sh --no-validate- Effect: Disables post-deployment validation
- Default: Validation enabled
- Use case: Speed up deployment if you'll validate separately
Disable continuous validation loop.
bash scripts/deploy-soroban-testnet.sh --no-continuous- Effect: Exits after deployment, no ongoing validation
- Default: Continuous validation enabled
- Use case: CI/CD pipelines with separate validation jobs
Perform deployment without actually sending to blockchain.
bash scripts/deploy-soroban-testnet.sh --dry-run- Effect: Builds and tests, but doesn't deploy
- Default: Disabled
- Use case: Test configuration before real deployment
Set validation check interval.
bash scripts/deploy-soroban-testnet.sh --interval 600- Default:
300(5 minutes) - Range:
60-3600 - Unit: Seconds
- Example: Validate every 10 minutes:
--interval 600
Enable debug logging.
bash scripts/deploy-soroban-testnet.sh --debug- Effect: Enables verbose output
- Default: Disabled
- Output: To
$DEPLOYMENT_LOG
Display help information.
bash scripts/deploy-soroban-testnet.sh --helpThese can be set to customize script behavior:
# Maximum deployment retry attempts
export MAX_RETRIES=5
# Validation interval (seconds)
export VALIDATION_INTERVAL=300
# Skip non-essential checks
export SKIP_CARGO_CHECK=falsesanctifier deploy <CONTRACT_PATH>- Default:
.(current directory) - Required: No
- Example:
./contracts/runtime-guard-wrapper
Target blockchain network.
sanctifier deploy . --network testnet- Options:
testnet,futurenet,mainnet - Default:
testnet - Short flag:
-n
Soroban secret key for deployment.
sanctifier deploy . --secret-key "$SOROBAN_SECRET_KEY"- Alternative: Environment variable
SOROBAN_SECRET_KEY - Short flag:
-s - Security: Prefer environment variable
Account ID for the deployer (optional).
sanctifier deploy . --account-id GXXXXX...- Format: Stellar public key
- Optional: Usually auto-detected
- Short flag:
-a
Enable validation after deployment.
sanctifier deploy . --validate- Effect: Runs health check after deployment
- Default: Enabled
- Short flag:
-v
Output format for results.
sanctifier deploy . --output-format json- Options:
text,json - Default:
text - Short flag:
-o - Use case:
jsonfor parsing in scripts
# Basic deployment to testnet
sanctifier deploy ./contracts/runtime-guard-wrapper
# Deploy with validation and JSON output
sanctifier deploy ./contracts/runtime-guard-wrapper \
--validate \
--output-format json
# Deploy to mainnet (careful!)
sanctifier deploy ./contracts/runtime-guard-wrapper \
--network mainnet \
--secret-key "$MAINNET_KEY"on:
push:
branches: ["main"]
paths:
- "contracts/runtime-guard-wrapper/**"
schedule:
- cron: "0 */6 * * *" # Every 6 hours
workflow_dispatch:
inputs:
network:
default: "testnet"
description: "Target network"
dry_run:
default: false
description: "Perform dry run"env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
DEBUG: false
LOG_LEVEL: infoConfigure in workflow file under jobs: → build-and-deploy: → steps:
- name: Deploy to Soroban testnet
run: |
bash scripts/deploy-soroban-testnet.sh \
--network testnet \
--interval 300 \
--debug
env:
SOROBAN_SECRET_KEY: ${{ secrets.SOROBAN_SECRET_KEY }}Add to Settings → Secrets and variables → Actions:
Name: SOROBAN_SECRET_KEY
Value: SBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The workflow runs continuous validation every 6 hours:
schedule:
- cron: "0 0,6,12,18 * * *" # Every 6 hoursTo change frequency, edit the cron expression:
- Every 2 hours:
"0 */2 * * *" - Every 12 hours:
"0 0,12 * * *" - Daily:
"0 0 * * *"
See cron syntax reference for more patterns.
Contract ID to validate (required).
bash scripts/validate-runtime-guards.sh \
--contract-id C1234567890123456789012345678901234567890123456789012345- Format: Contract address starting with
C - Required: Yes
- Short flag: None
Target network for validation.
bash scripts/validate-runtime-guards.sh \
--contract-id C... \
--network testnet- Options:
testnet,futurenet,mainnet - Default:
testnet - Short flag: None
Edit test parameters in script:
# In validate-runtime-guards.sh
# Performance threshold (milliseconds)
PERF_THRESHOLD=30000
# Minimum pass rate to succeed
MIN_PASS_RATE=80
# Concurrent operation count
CONCURRENT_OPS=3The validation script runs these tests (by default, all enabled):
- Health Check - Verify contract accessibility
- Statistics - Retrieve and validate stats
- Execution Monitoring - Test contract invocations
- Event Emission - Verify event logging
- Storage Access - Check storage accessibility
- Performance - Measure execution time
- Error Handling - Test error conditions
- Concurrent Ops - Test concurrent calls
# .env.local
SOROBAN_SECRET_KEY=SBXXXXXXX...
SOROBAN_NETWORK=testnet
DEBUG=true
LOG_LEVEL=debug
# Deploy with all features
bash scripts/deploy-soroban-testnet.sh \
--network testnet \
--interval 60 \
--debug# .github/workflows/soroban-deploy.yml
- name: Deploy
run: |
bash scripts/deploy-soroban-testnet.sh \
--network testnet \
--no-continuousbash scripts/deploy-soroban-testnet.sh \
--network testnet \
--no-validate \
--no-continuousbash scripts/deploy-soroban-testnet.sh \
--network testnet \
--interval 300 \
--validate \
--debugSettings are applied in this order (later overrides earlier):
- Script defaults
- Environment variables
- CLI/script arguments
- GitHub Actions secrets/inputs
Results are saved to:
- Manifest:
.deployment-manifest.json - Logs:
.deployment.log - Validation:
.validation-results.json
Example results structure:
{
"contract_id": "C1234567...",
"network": "testnet",
"timestamp": "2024-02-25T10:30:00Z",
"test_results": {
"total_tests": 8,
"passed": 7,
"failed": 1,
"pass_rate": 87
},
"status": "PASS"
}Enable full debugging:
export DEBUG=true
export LOG_LEVEL=debug
bash scripts/deploy-soroban-testnet.sh \
--network testnet \
--dry-run \
--debugCheck output files:
# Deployment log
tail -200 .deployment.log
# Manifest
jq . .deployment-manifest.json
# Validation results
jq . .validation-results.jsonFor more information, see: