# Testnet Deployment Guide
## Prerequisites
- Rust toolchain (see rust-toolchain.toml)
- Stellar CLI (install instructions)
- Node.js 20+ / npm
- PostgreSQL 15+
- A Chromium browser + Freighter extension
## 1. Deploy the Soroban contract
- Build WASM
- Generate deployer keypair + fund via Friendbot
- Deploy with stellar-cli
- Record SOROBAN_CONTRACT_ID
## 2. Configure the backend
- .env values: DATABASE_URL, JWT_SECRET, SOROBAN_CONTRACT_ID, STELLAR_NETWORK=testnet
- Run migrations
- Start backend
## 3. Verify EscrowService
- Register two users (client + freelancer)
- POST /contracts — create a contract
- POST /contracts/:id/fund — decode the returned XDR in Stellar Lab
- Expected: valid invokeHostFunction envelope targeting the contract
## 4. Sign and submit with Freighter
- Install Freighter, switch to testnet
- Import the test keypair
- Fund escrow from the UI
- Verify contract status → ACTIVE
## 5. Approve a milestone
- Submit and approve a milestone
- Verify the Payment record exists in the DB
- Confirm the tx on stellar.expert
## Troubleshooting
- Common Horizon RPC errors
- XDR decode failures
- Contract not found
Summary
Issue #54 has been open since July 10 and is a Week 4 roadmap item. This issue specifies exactly what the guide must cover so a contributor can pick it up.
A new contributor should be able to follow
docs/testnet-deployment.mdalone and arrive at a funded escrow contract on Stellar testnet with backend calls succeeding.Document outline
Acceptance criteria
Related
docs/local-development.md— local setup (this guide extends it)