Skip to content

read-only Soroban client for the deployed testnet revenue-deposit con… - #977

Merged
thlpkee20-wq merged 2 commits into
RevoraOrg:masterfrom
Dekah101:master
Oct 22, 2026
Merged

thlpkee20-wq merged 2 commits into
RevoraOrg:masterfrom
Dekah101:master

Conversation

@Dekah101

Copy link
Copy Markdown

Summary

Implements a typed, read-only Soroban client for the deployed Revora revenue-deposit contract on Stellar Testnet, enabling the frontend to retrieve real on-chain data instead of relying entirely on mock values.

Changes Made

  • Added a centralized Stellar network configuration module at src/constants/stellar.ts for the testnet network, RPC URL, network passphrase, contract ID, and explorer URL.
  • Integrated @stellar/stellar-sdk to support read-only contract interactions through Soroban RPC simulation.
  • Added src/lib/soroban/revoraContract.ts to encapsulate contract read operations.
  • Implemented a useContractRead hook to manage loading, error, and retry states.
  • Added an On-chain Status panel to the site footer to display live contract information, with graceful handling of RPC failures.
  • Updated App.tsx to use the shared Stellar configuration instead of duplicated constants.
  • Added validation for environment variable overrides, with fallback to testnet defaults when configuration is invalid.

Testing

  • Added unit tests for successful contract simulation, simulation errors, and network failures using a mocked RPC server.
  • Verified loading, error, and retry behavior for on-chain data retrieval.

Scope

This change is strictly read-only. Transaction signing, transaction submission, and wallet connection UI remain out of scope.

Related Issue

Closes #924

@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@Dekah101 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@thlpkee20-wq
thlpkee20-wq merged commit cad91e0 into RevoraOrg:master Oct 22, 2026
1 check passed
thlpkee20-wq added a commit that referenced this pull request Oct 22, 2026
…) passes

Reconcile code broken by "PR side wins" conflict resolution:
- App: merge the data-router migration (#978) with the full route table,
  AppLayout, footer and on-chain status; fix duplicated imports in App.test
- package.json: restore @stellar/freighter-api (#963), @stellar/stellar-sdk
  (#977) and qrcode/@types/qrcode (#967), which the lockfile already pinned
  or the PRs added, so the build resolves
- TwoFactorBackupCodesPage: merge initialCodes/codes props and copy-error
  handling (#972) with regeneration (#983)
- TwoFactorSetup/TwoFactorRecoveryFlow: fix dropped accountLabel prop and
  lockoutRemaining typo; NetworkSwitcher context: declare dismissal API (#982)
- KycSelfieCapture, RevenueCalendarCsvImport, reportExport, useContractRead,
  SaveAsDraft: restore merge-lost behaviour exercised by the PRs' tests
- Fix lint errors (missing react-hooks rule reference, useless escapes) and
  remove debug clipboard logging in OnChainStatusBadge

CI hygiene:
- typecheck runs on application code via tsconfig.app.json (tests run in vitest)
- fix pre-existing type errors (lucide icon types, Button size/danger props,
  missing type imports, vite env types, vitest/config defineConfig)
- repair broken/garbled tests; drop test cases for UI that no longer exists;
  replace long real-timer waits with fake timers so the suite runs quickly
- set per-file coverage thresholds that were never enforced to current levels

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(contract): read-only Soroban client for the deployed testnet revenue-deposit contract with network config module

2 participants