Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Contracts] Add stream_count view function

Aperta
#421 6 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

@Anthony-19 ci sta già lavorando.

Dal 30/6/2026.

  • #433 di @dubemoyibe-star — chiusa senza merge
  • #964 di @Anthony-19 — chiusa senza merge
  • #988 di @Anthony-19 — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

contracts good first issue GrantFox OSS Maybe Rewarded Official Campaign | FWC26 smart-contract Stellar Wave

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) -> u64 view is implemented
  • Returns 0 on 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LabsCrypt/flowfi

Tutte le issue di LabsCrypt/flowfi

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.