Skip to content

🚨 [CRITICAL] v1 Deploy Route Uses Simulated Deployment Instead of Real Soroban CLI - #1017

Open
Martins-594 wants to merge 1 commit into
StellarDevHub:mainfrom
Martins-594:fix/replace-simulated-deploy-with-soroban-cli
Open

🚨 [CRITICAL] v1 Deploy Route Uses Simulated Deployment Instead of Real Soroban CLI#1017
Martins-594 wants to merge 1 commit into
StellarDevHub:mainfrom
Martins-594:fix/replace-simulated-deploy-with-soroban-cli

Conversation

@Martins-594

Copy link
Copy Markdown

Description

The /api/v1/deploy endpoint was using a simulated deployment that generated random contract IDs with Math.random() and setTimeout() instead of actually invoking the Soroban CLI.

Location

backend/src/routes/deploy.routes.ts (previously simulated deploy)

Issue

Despite the README claiming contracts are deployed to the Stellar Testnet, the route never actually executed soroban contract deploy. The real deployContract() function now exists in backend/src/services/deployService.ts and is properly called by the deploy route.

Impact

The previous simulated deploy returned fake contract IDs that could not be used for any real on-chain interaction. This made the deploy flow non-functional for production use.

Required Fix (implemented)

  • Created backend/src/services/deployService.ts with deployContract() that invokes the Soroban CLI via child_process.execFile
  • Created backend/src/routes/deploy.routes.ts with POST /deploy that calls the real deploy service
  • Registered the deploy route in backend/src/routes/index.ts
  • The service handles WASM path validation, network selection (testnet/mainnet/local), RPC URL configuration, and returns real contract IDs from the Soroban network

Reference

Closes #993

The /api/v1/deploy route was using a simulated deployment (Math.random,
setTimeout) instead of actually invoking the Soroban CLI. This commit
replaces the simulated deploy with a real deployService that calls
'soroban contract deploy' via child_process.

- Create deployService.ts with proper Soroban CLI integration
- Create deploy.routes.ts with POST /deploy endpoint
- Register deploy route in routes/index.ts
- Remove reliance on simulated Math.random/setTimeout patterns

Closes StellarDevHub#993
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Martins-594 is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Martins-594 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

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.

🚨 [CRITICAL] v1 Deploy Route Uses Simulated Deployment Instead of Real Soroban CLI

1 participant