Skip to content

Replace mock data layer with live Soroban contract calls in services.ts #1

Description

@Prasiejames

Description

The src/lib/contracts/services.ts file currently wraps mock data from constants.ts. For production, it needs to call actual Soroban smart contracts deployed on Stellar.

Requirements

  • Replace each fetch* function with real rpc.Server calls using the contract IDs from src/lib/contracts/addresses.ts
  • Use buildAndSendContractCall from src/lib/contracts/client.ts for mutations
  • Keep the mock data as a fallback when no wallet is connected or contracts are unreachable
  • All functions must preserve their exact return types (Asset[], Investor[], etc.)

Relevant files

  • src/lib/contracts/services.ts
  • src/lib/contracts/client.ts
  • src/lib/contracts/addresses.ts

Complexity: High (200 pts)

Requires understanding Soroban contract interaction, the existing client layer, and careful type mapping from ScVal to the app types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HighWorth 200 points in Drips Wave

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions