Description
backend/src/services/stellar.rs stubs out all contract invocations. These must be wired to the live Soroban contracts so the backend can trigger on-chain state changes (milestone releases, dispute resolution).
Requirements
- Load judge authority keypair from
JUDGE_AUTHORITY_SECRET
- For each method, build a Soroban
InvokeHostFunctionOp XDR transaction using the stellar-xdr crate
- Fetch current sequence number from Horizon before signing each transaction
- Submit via Soroban RPC
sendTransaction; poll getTransaction until confirmed or failed
- Implement
release_milestone, open_dispute, and resolve_dispute
Acceptance Criteria
- Testnet integration test:
release_milestone submits a real transaction and returns a valid tx hash
- A failed submission (e.g. wrong contract ID) returns
Err(...) with a descriptive message
- Sequence number collision errors are retried once with a refreshed sequence number
Description
backend/src/services/stellar.rsstubs out all contract invocations. These must be wired to the live Soroban contracts so the backend can trigger on-chain state changes (milestone releases, dispute resolution).Requirements
JUDGE_AUTHORITY_SECRETInvokeHostFunctionOpXDR transaction using thestellar-xdrcratesendTransaction; pollgetTransactionuntil confirmed or failedrelease_milestone,open_dispute, andresolve_disputeAcceptance Criteria
release_milestonesubmits a real transaction and returns a valid tx hashErr(...)with a descriptive message