Skip to content

[Docs] Write docs/testnet-deployment.md — end-to-end guide from zero to funded escrow #103

Description

@gregemax

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.md alone and arrive at a funded escrow contract on Stellar testnet with backend calls succeeding.

Document outline

# 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

Acceptance criteria

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentationdocumentationImprovements or additions to documentationstellarStellar blockchain

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions