Skip to content

Soroban RPC Contract Calls (Backend) #5

@soomtochukwu

Description

@soomtochukwu

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions