[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) -> tx
updateAllocation(admin, projectId, newAmount, signer) -> tx
removeAllocation(admin, projectId, signer) -> tx
getAllocation(projectId)
getTotalAllocations()
listAllocations()
Tasks
Acceptance
[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.tsAPI
initialize(admin, signer)allocateFunds(admin, projectId, amount, signer) -> txupdateAllocation(admin, projectId, newAmount, signer) -> txremoveAllocation(admin, projectId, signer) -> txgetAllocation(projectId)getTotalAllocations()listAllocations()Tasks
src/lib/contracts/budget_allocation.ts.amountfitsi128andprojectIdis a valid u32.Acceptance