This document covers the deployment process for Stellarcade smart contracts and the backend API.
- Build all contracts:
./scripts/deploy-contracts.sh --build
- Validate the deployment environment (Dry-Run):
./scripts/deploy-contracts.sh --dry-run --network testnet --source <YOUR_IDENTITY>
- Deploy to Futurenet/Testnet:
./scripts/deploy-contracts.sh --network testnet --source <YOUR_IDENTITY>
- Save the returned Contract IDs to your
.envfile in the backend.
- Prepare audited WASM binaries.
- Ensure the admin identity is a secure multi-sig account.
- Deploy using the same Soroban CLI commands with
--network mainnet.
- Build the production image:
docker build -t stellarcade-backend ./backend
- Deploy using your preferred orchestration tool (Kubernetes, AWS ECS, etc.).
Ensure the following variables are set in your production environment:
NODE_ENV=productionDATABASE_URLREDIS_URLSTELLAR_NETWORK=publicHORIZON_URL=https://horizon.stellar.org
We use GitHub Actions for our CI/CD pipeline.
- Lint & Test: Triggered on every Pull Request.
- Build & Deploy: Triggered on every merge to
main(includes a dry-run validation step).
Before any mutating deployment step occurs, you can run a dry-run to validate required inputs, secrets, and network identifiers.
Run the deployment script with the --dry-run flag:
./scripts/deploy-contracts.sh --dry-run --network testnetThe DeploymentService provides a programmatic way to check deployment readiness:
const DeploymentService = require('./src/services/deployment.service');
const report = await DeploymentService.performDryRun();
console.log(report);- Use Winston for structured logging.
- Integrate with Sentry for error tracking.
- Monitor Stellar network status via the Stellar Status Dashboard.
- Backend: Redeploy the previous Docker image tag.
- Contracts: Update the contract reference in the backend to the previous stable Contract ID (Note: On-chain contracts are typically immutable or require a migration).