https://t.me/+DOylgFv1jyJlNzM0
Description
The contract has no way to report how many streams exist, making cursor-based or offset pagination impossible without a full DB scan on the backend. A simple stream_count() -> u64 view function that returns the global stream counter enables the backend (and any external indexer) to implement correct pagination without an extra DB roundtrip.
Acceptance Criteria
Files to Touch
contracts/flowfi/src/lib.rs — add stream_count function
contracts/flowfi/src/test.rs — unit test
packages/sdk/src/index.ts — regenerated bindings
https://t.me/+DOylgFv1jyJlNzM0
Description
The contract has no way to report how many streams exist, making cursor-based or offset pagination impossible without a full DB scan on the backend. A simple
stream_count() -> u64view function that returns the global stream counter enables the backend (and any external indexer) to implement correct pagination without an extra DB roundtrip.Acceptance Criteria
stream_count(env: Env) -> u64read-only function is implemented0)create_streamcallFiles to Touch
contracts/flowfi/src/lib.rs— addstream_countfunctioncontracts/flowfi/src/test.rs— unit testpackages/sdk/src/index.ts— regenerated bindings