[Contracts] Add stream_count view function
I maintainer di solito rispondono entro 7 giorni
@Anthony-19 ci sta già lavorando.
Dal 30/6/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Labels: good first issue, contracts, Stellar Wave, smart-contract
There's no way to ask the contract how many streams exist, so the backend can't paginate without a full DB scan.
Add a read-only stream_count(env: Env) -> u64 that returns the global stream ID counter. That's the total number of streams ever created, not the active count. With it, the backend or any external indexer can do cursor/offset pagination without an extra roundtrip.
What the fix has to hold to
- Returns the monotonic stream ID counter, not a filtered/active count
- Doesn't panic on a fresh deploy, returns
0
Done when
-
stream_count(env: Env) -> u64view is implemented - Returns
0on a freshly-deployed contract - Unit test asserts the count goes up by 1 after each
create_stream - TypeScript bindings regenerated
- Tests + fmt pass, CI green
Where to start
Add the function in contracts/flowfi/src/lib.rs, test in contracts/flowfi/src/test.rs, then regen packages/sdk/src/index.ts. Small, good first contract issue.
- Lingua principale
- TypeScript
- Stelle
- 18
- Fork
- 250
- Merge medio
- 5g 6h
- PR unite (30g)
- 83
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di LabsCrypt/flowfi
-
backend points: 150 testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 7 giorni
-
backend points: 150 testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 7 giorni
-
backend points: 150 testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 7 giorni
-
backend points: 150 testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 7 giorni
-
backend points: 150 testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 7 giorni
Tutte le issue di LabsCrypt/flowfi
Issue simili
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
0️⃣ phase/new
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/playwright#43640 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100