Description
apps/web/lib/contracts.ts stubs depositEscrow, releaseMilestone, and openDispute. These helpers bridge the UI to the on-chain contracts via Freighter.
Requirements
- Build a Soroban invocation XDR for each contract function using
@stellar/stellar-sdk
- Pass XDR to
signTransaction() (from stellar.ts); submit signed XDR to Soroban RPC
- Return the confirmed transaction hash
- Display a loading state during submission (handled by the calling component)
Acceptance Criteria
depositEscrow on Testnet locks USDC and returns a tx hash
releaseMilestone transitions the escrow job milestone on-chain
- Invalid parameters (e.g. zero amount) throw before submitting a transaction
Description
apps/web/lib/contracts.tsstubsdepositEscrow,releaseMilestone, andopenDispute. These helpers bridge the UI to the on-chain contracts via Freighter.Requirements
@stellar/stellar-sdksignTransaction()(fromstellar.ts); submit signed XDR to Soroban RPCAcceptance Criteria
depositEscrowon Testnet locks USDC and returns a tx hashreleaseMilestonetransitions the escrow job milestone on-chain