-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestneeds-triage
Description
🔍 Problem Statement
📖 Description
Create a backend API endpoint to handle contract deployment via Soroban. This route will validate input, trigger contract deployment, and persist the deployed contract address in the database.
Endpoint
- POST
/api/contracts/deploy
Expected Behavior
- Input Validation:
- Validate request body fields (e.g., project ID, contract parameters).
- Ensure wallet signature and authentication are verified.
- Contract Deployment:
- Trigger Soroban contract deployment using the provided parameters.
- Handle deployment errors gracefully with clear error responses.
- Persistence:
- Store the deployed contract address in the database.
- Link contract to the appropriate project and user.
🛠 Technical Notes
- Use middleware for wallet signature verification and session handling.
- Integrate with Soroban SDK for contract deployment.
- Ensure database schema supports storing contract addresses (linked to projects and users).
- Maintain secure error handling and logging.
- Follow RESTful API design principles.
✅ Acceptance Criteria
POST /api/contracts/deployaccepts valid input and deploys a Soroban contract.- Invalid input or failed deployment returns proper error codes (
400,401,500). - Deployed contract address is stored in the database and linked correctly.
- Endpoint passes integration tests.
npm run lintandnpm run buildsucceed.- No regression in authentication, wallet connection, or dashboard features.
📈 Expected Impact
High — Would significantly improve user experience
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestneeds-triage