feat(core): add participation-token module with buy endpoint#55
Conversation
…ss-Work#40) - Create ParticipationTokenModule with controller, service, and BuyDto - POST /participation-token/buy returns { unsignedXdr } for client signing - Uses SorobanService.buildContractCallTransaction for on-chain interaction - Register ParticipationTokenModule in AppModule Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a new NestJS module Changes
Sequence DiagramsequenceDiagram
actor Client
participant Controller as ParticipationTokenController
participant Service as ParticipationTokenService
participant Soroban as SorobanService
Client->>Controller: POST /participation-token/buy (BuyDto)
activate Controller
Controller->>Service: buy(dto)
deactivate Controller
activate Service
Service->>Soroban: buildContractCallTransaction(contractId, "buy", args, callerPublicKey)
deactivate Service
activate Soroban
Note over Soroban: Create client → call contract method → return unsigned XDR
Soroban-->>Service: unsignedXdr
deactivate Soroban
Service-->>Controller: unsignedXdr
Controller-->>Client: { unsignedXdr }
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
ParticipationTokenModuletoapps/core/src/with REST endpoint to interact with deployed Participation Token contractsPOST /participation-token/buy→ returns{ unsignedXdr }for client-side signingSorobanService.buildContractCallTransaction()to build the on-chain callAppModule, does not interfere with existingdeploymoduleFiles created/modified
apps/core/src/app.module.ts— addedParticipationTokenModuleto importsTest plan
POST /participation-token/buyreturns{ unsignedXdr }with valid request bodydeploy,campaigns, orinvestmentsendpointsCloses #40
🤖 Generated with Claude Code
Summary by CodeRabbit