Description
The /api/v1/deploy endpoint in backend/src/routes/v1/deploy.js uses a simulated deployment that generates random contract IDs with Math.random() and setTimeout() instead of actually invoking the Soroban CLI.
Location
backend/src/routes/v1/deploy.js (lines 62-83)
Issue
// For the MVP, if no actual network configs/keys are present,
// we simulate the deployment response.
setTimeout(() => {
const contractId =
"C" + Math.random().toString(36).substring(2, 54).toUpperCase();
// ...
}, 1500);
Impact
Despite the README claiming contracts are deployed to the Stellar Testnet, this route never actually executes soroban contract deploy. The real deployContract() function exists in backend/src/services/deployService.js but is never called by this route.
Required Fix
Replace the simulated deployment with a call to the real deployContract() function from deployService.js, which properly invokes the Soroban CLI via child process.
Reference
Identified during full codebase audit of soroban-playground monorepo.
Description
The
/api/v1/deployendpoint inbackend/src/routes/v1/deploy.jsuses a simulated deployment that generates random contract IDs withMath.random()andsetTimeout()instead of actually invoking the Soroban CLI.Location
backend/src/routes/v1/deploy.js(lines 62-83)Issue
Impact
Despite the README claiming contracts are deployed to the Stellar Testnet, this route never actually executes
soroban contract deploy. The realdeployContract()function exists inbackend/src/services/deployService.jsbut is never called by this route.Required Fix
Replace the simulated deployment with a call to the real
deployContract()function fromdeployService.js, which properly invokes the Soroban CLI via child process.Reference
Identified during full codebase audit of soroban-playground monorepo.