Local Development Setup
This runbook covers setting up the complete SLASettle local environment across both repositories (slasettle-vault and slasettle-hub).
Verified Toolchain Versions
The codebase is built and tested against the following verified toolchain:
| Tool / Runtime | Verified Version | Configuration Location |
|---|---|---|
| Rust / Cargo | 1.84.0+ (verified 1.97.1) | rust-toolchain.toml / system cargo |
| Stellar CLI | 28.1.0 (with stellar-xdr 28.0.0) | Host system binary (stellar) |
| Node.js | v20.0.0+ (verified v24.21.0) | .nvmrc in repository root |
| pnpm | 9+ (verified 12.8.2) | packageManager field in package.json |
| Go | 1.22+ (verified 1.25.1) | services/watcher/go.mod |
1. Smart Contracts Repository (slasettle-vault)
bash
git clone https://github.com/SLASettleHQ/slasettle-vault.git
cd slasettle-vault
# Build release WASM bytecode
stellar contract build
# Run contract test suites
cargo test --workspaceIMPORTANT
sla_vault references watcher_registry via soroban_sdk::contractimport!. You must run stellar contract build before executing cargo check, cargo test, or cargo clippy on a fresh checkout, otherwise the macro cannot locate the companion WASM file.
2. Monorepo Infrastructure (slasettle-hub)
bash
git clone https://github.com/SLASettleHQ/slasettle-hub.git
cd slasettle-hub
# Install root dependencies (SDK, Web, Docs)
pnpm installBuilding Workspace Packages
bash
# Build TypeScript SDK and Next.js Web Console
pnpm run build
# Run linter and typechecks
pnpm run lint
pnpm run typecheck3. Off-Chain Services Setup
Event Indexer Service
bash
cd services/indexer
npm ci
npm run build
npm testWatcher Node Daemon
bash
cd services/watcher
go build ./...
go test ./...4. Running the Local Development Stack
To run the full stack locally against Stellar Testnet:
- Configure Environment Variables: Copy
.env.exampleto.env.localinapps/weband.envinservices/indexerwith active contract addresses (see Environment Configuration). - Start Indexer:bash
cd services/indexer npm run dev - Start Web Console:bashOpen
pnpm --filter @slasettle/web devhttp://localhost:3000in your browser. - Start Documentation Portal:bashOpen
pnpm --filter @slasettle/docs devhttp://localhost:5173in your browser.