This guide explains how to quickly set up a local Soroban testing environment for the Invoice Liquidity Network project. The Hardhat-style test environment allows you to develop, build, and test locally in under 5 minutes.
- Docker and Docker Compose: Required to run the local Stellar node and initialization services.
- Ensure ports
8000and11626are available. - (Optional) A compiled
.wasmcontract file located atbackend/target/wasm32-unknown-unknown/release/invoice_liquidity.wasmor similar. If not found, a dummy contract ID will be generated for testing.
To start the complete environment (Stellar node, contract deployment, and account seeding), run:
docker compose upFor detached mode, use:
docker compose up -dThe stack will:
- Start a local Stellar Quickstart node.
- Wait for the node to become healthy.
- Deploy the smart contract (via the
contract-deployerservice). - Create and fund test accounts and mock assets (via the
account-seederservice).
Once the account-seeder service completes, it writes essential information to the git-ignored .docker-output/ directory:
.docker-output/accounts.json: Contains the public and secret keys for thefreelancer,payer, andfundertest accounts, along with the deployedusdcandeurcasset IDs, and thecontractId..docker-output/contract-id.txt: The raw deployed contract ID..docker-output/usdc-id.txt/.docker-output/eurc-id.txt: The raw IDs of the mock tokens.
These files are formatted for easy consumption by the frontend and CLI tools.
To stop the environment and completely clear the local chain state and volumes, run:
docker compose down -vNote: The
-vflag ensures that the local persistent chain data (stellar-datavolume) is removed, giving you a completely fresh slate on your next start.
- Containers failing to start: Ensure Docker is running and ports
8000and11626are not occupied by other services. - Contract deployed with dummy ID: If you see
dummy-contract-id-for-local-devin.docker-output/contract-id.txt, it means the compiled.wasmfile wasn't found. Ensure you've built the contract locally first usingmake buildor standard Rust cargo commands inside the contract workspace. - Node healthcheck failing: In rare cases, the quickstart node takes longer to initialize. The seeder and deployer will patiently wait or retry via Docker Compose dependency checks.