Skip to content

[Smart Contract] Deploy escrow contract to Stellar testnet and wire SOROBAN_CONTRACT_ID to backend #99

Description

@gregemax

Summary

The Soroban escrow contract (stellance/Contracts/src/lib.rs) is complete, test-covered (30 tests), and compiles to WASM. It has never been deployed to testnet. Issue #46 was created for this — this issue captures the full wiring work needed after deployment.

Steps

1. Deploy to testnet

# Install Stellar CLI
cargo install --locked stellar-cli --features opt

# Generate deployer account
stellar keys generate deployer --network testnet

# Fund via Friendbot
stellar keys fund deployer --network testnet

# Build + deploy
cd stellance/Contracts
cargo build --target wasm32-unknown-unknown --release

stellar contract deploy   --wasm target/wasm32-unknown-unknown/release/stellance_escrow.wasm   --source deployer   --network testnet

2. Record the contract address

  • Add SOROBAN_CONTRACT_ID=C... to stellance/backend/.env.example
  • Add STELLAR_NETWORK=testnet to .env.example

3. Smoke-test the backend integration

  • Start the backend with the real contract ID
  • Call POST /contracts/:id/fund and verify the returned XDR decodes correctly in Stellar Lab
  • Verify EscrowService.buildFundXdr() assembles the correct invokeContractFunction envelope

4. Update CI

  • Add a contract address secret (SOROBAN_CONTRACT_ID) to GitHub Actions secrets for testnet smoke tests

Acceptance criteria

  • Contract deployed and address documented
  • .env.example updated with SOROBAN_CONTRACT_ID
  • POST /contracts/:id/fund returns valid XDR on testnet
  • Deployment steps added to docs/local-development.md

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions