📋 Looking for the full checklist? See the Mainnet Deployment Checklist — a comprehensive 9-phase runbook covering contract deployment, security hardening, k8s, monitoring, and emergency procedures. This document is the condensed original; the checklist is the authoritative guide.
This runbook documents the steps required to deploy Stellar-IndigoPay to Stellar Mainnet, configure backend and frontend environment variables, and register the initial climate projects on-chain.
This guide is intended for deployers and DevOps engineers preparing the first Mainnet launch.
Node.js >= 18.xnpmRust + Cargocargo install --locked stellar-cli- A funded Stellar Mainnet account for contract deployment and admin operations
freighteror another Stellar wallet for admin key management- Access to update
frontend/.env.localandbackend/.env
The IndigoPay contract lives in contracts/indigopay-contract.
cd contracts/indigopay-contract
cargo build --target wasm32-unknown-unknown --releaseConfirm the WASM artifact exists:
ls -lh target/wasm32-unknown-unknown/release/indigopay_contract.wasmThe repository includes scripts/deploy-contract.sh to simplify deployment.
chmod +x scripts/deploy-contract.sh
./scripts/deploy-contract.sh mainnet <identity>mainnetselects Stellar Mainnet.<identity>is the named Stellar CLI identity configured for your deployer account.
If the deploy succeeds, the script prints:
NEXT_PUBLIC_CONTRACT_ID=<contract-id>CONTRACT_ID=<contract-id>
./scripts/deploy-contract.sh mainnet aliceUpdate the frontend and backend environment files with Mainnet endpoints and the deployed contract ID.
NEXT_PUBLIC_STELLAR_NETWORK=mainnet
NEXT_PUBLIC_HORIZON_URL=https://horizon.stellar.org
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban.stellar.org
NEXT_PUBLIC_API_URL=https://your-production-api.example.com
NEXT_PUBLIC_CONTRACT_ID=<contract-id>PORT=4000
STELLAR_NETWORK=mainnet
HORIZON_URL=https://horizon.stellar.org
SOROBAN_RPC_URL=https://soroban.stellar.org
CONTRACT_ID=<contract-id>
ALLOWED_ORIGINS=https://your-production-app.example.com
backend/src/services/stellar.jsreadsSTELLAR_NETWORK,HORIZON_URL,SOROBAN_RPC_URL, andCONTRACT_IDfrom this file.
The smart contract requires an admin call to register_project(...) for each verified climate project.
Note: the existing
scripts/register-project.shhelper is hard-coded for testnet. For Mainnet, use the directstellar contract invokeflow.
stellar contract invoke \
--id <contract-id> \
--source <admin-identity> \
--network mainnet \
-- register_project \
--admin <admin-public-key> \
--project_id "project-001" \
--name "Amazon Reforestation" \
--wallet <project-wallet-address> \
--co2_per_xlm 8500project_idshould be unique and stable (e.g.amazon-reforestation).walletis the project’s Stellar destination account.co2_per_xlmis grams of CO₂ offset per XLM donated.
- Confirm the admin account has enough XLM for fees.
- Verify the target project wallets are valid Mainnet Stellar addresses.
- Register one project at a time.
- Confirm success by querying the project record.
- Confirm the contract ID exists on Stellar Mainnet.
- Inspect contract metadata with Soroban CLI or a Mainnet explorer.
Call get_project() via the contract or through the backend API to ensure the registered project is visible.
- Start the backend with
cd backend && npm run dev. - Start the frontend with
cd frontend && npm run dev. - Ensure the frontend uses
NEXT_PUBLIC_CONTRACT_IDand can read project data from the contract.
Use a dedicated deployer/admin identity for contract initialization and project registration. Keep the secret seed private and secure.
Set ALLOWED_ORIGINS in backend/.env to your production frontend URL.
Mainnet uses the public passphrase:
Public Global Stellar Network ; September 2015
stellar: command not found: installstellar-cliwithcargo install --locked stellar-cli.contract deployfails: confirm the identity has enough XLM and the account exists on Mainnet.Contract ID not configured: ensureNEXT_PUBLIC_CONTRACT_IDandCONTRACT_IDare set correctly.Soroban RPCerrors: verifySOROBAN_RPC_URL=https://soroban.stellar.org.
- Add a deployment manifest with the contract ID and project IDs.
- Update
scripts/register-project.shto support Mainnet. - Add a production-ready frontend origin to
ALLOWED_ORIGINS.