You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The contract emits a `MetadataUpdated` event containing both the old and new metadata values. The backend event indexer processes this event and updates local state automatically.
101
101
102
+
### Multi-token campaigns (issue #191)
103
+
104
+
Campaigns can accept more than one Stellar asset code. When `acceptedTokens` contains multiple entries the frontend renders a per-token progress bar beneath the main progress bar, and the pledge form shows a token selector so contributors can choose which asset to pledge.
105
+
106
+
The backend tracks per-token pledge totals in the `tokenBalances` field (a `Record<assetCode, amount>` map built from the `pledges` table grouped by `asset_code`). This is returned on every `GET /api/campaigns/:id` response and on the campaign list.
107
+
108
+
**Contract side:** The Soroban contract stores `accepted_tokens: Vec<String>` on each campaign. `contribute()` validates that the pledged asset is in the list before recording the pledge.
109
+
110
+
**Frontend side:**`CampaignCard` renders individual `<div class="progress-bar">` elements for each accepted token when `tokenBalances` is present. `CampaignDetailPanel` conditionally shows a `<select>` token picker above the amount field when `acceptedTokens.length > 1`.
111
+
112
+
**Backend side:**`getCampaignTokenBalances(campaignId)` queries the `pledges` table grouped by `asset_code` and returns the map. `getCampaign()` populates `campaign.tokenBalances` on every read.
113
+
102
114
### Deadline extension governance (issue #192)
103
115
104
116
Any existing contributor can request a deadline extension:
@@ -203,6 +215,26 @@ Base URL:
203
215
-`status` is `ok` when the API and database probe succeed, otherwise `degraded`
204
216
-`database.status` is `up` or `down` based on a lightweight SQLite reachability check
205
217
218
+
### `GET /api/stats`
219
+
220
+
- Returns aggregate metrics and totals computed from campaigns and pledges.
0 commit comments