-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
[FE] Budget Allocation Service
Objective
Create a service that wraps the existing budget_allocation bindings for StarShop. (No binding generation required.)
File
src/lib/services/budgetAllocation.service.ts
API
initialize(admin, signer)allocateFunds(admin, projectId, amount, signer) -> txupdateAllocation(admin, projectId, newAmount, signer) -> txremoveAllocation(admin, projectId, signer) -> txgetAllocation(projectId)getTotalAllocations()listAllocations()
Tasks
- Import client from
src/lib/contracts/budget_allocation.ts. - Implement the methods above (reads without signer, writes with signer).
- Validate
amountfitsi128andprojectIdis a valid u32. - Return tx hash on writes.
Acceptance
- Service file exists and compiles.
- All methods typed and functional.
- Read methods work without signer.
- Write methods require signer and return tx hash.
Metadata
Metadata
Assignees
Labels
No labels