Skip to content

[SC-01] Build backend Soroban bridge service — typed client for the AssetsUp contracts #1113

Description

@yusuftomilola

Overview

AssetsUp ships extensive Soroban smart contracts (contracts/assetsup — registry, tokenization, dividends, voting, audit; plus maintenance and multisig contracts), but nothing connects to them. The Stellar SDK is installed in the backend and completely unused. This issue creates the single bridge service every other blockchain feature builds on.

What to Build

A StellarModule in backend/src/stellar/ exposing a SorobanService:

  • Config from env: STELLAR_NETWORK (testnet/futurenet/mainnet), SOROBAN_RPC_URL, ASSETSUP_CONTRACT_ID, backend signing keypair (STELLAR_SECRET_KEY) for server-signed operations
  • Core primitives: build → simulate → sign → send a contract invocation; read-only calls via simulation; decode XDR results into typed JS objects
  • Typed wrappers for the first methods needed by [SC-02]: register_asset, asset getters, and the audit-log reads (contracts/assetsup/src/lib.rs / asset.rs / audit.rs define the entrypoints)
  • Health: a startup check that logs contract reachability; graceful degradation — when Stellar env vars are absent, the module loads in "disabled" mode and dependents no-op (contributors without Stellar setup must be unaffected)
  • Error mapping: contract errors (contracts/assetsup/src/error.rs) surfaced as typed exceptions

References

  • Contract source: contracts/assetsup/src/
  • Blocked by nothing on the web2 side; consumed by [SC-02], [SC-07], [SC-08]

Acceptance Criteria

  • SorobanService invokes and reads the deployed testnet contract (document the deploy steps used for testing in the PR)
  • Disabled mode: app boots and all features work with no Stellar env configured
  • Contract errors map to typed, loggable exceptions
  • At least register_asset and one read method wrapped and demonstrated

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions