Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor stream fetching in the SDK [SBK-347] #72

Closed
alexisnsns opened this issue Nov 7, 2023 · 0 comments · Fixed by #112
Closed

Refactor stream fetching in the SDK [SBK-347] #72

alexisnsns opened this issue Nov 7, 2023 · 0 comments · Fixed by #112
Assignees
Labels
enhancement New feature or request

Comments

@alexisnsns
Copy link
Contributor

When calling onAllStreams, fetching the streams (using streammanager.publicClient.getContractEvents) can be slow on public nets if you don't pass a 'fromBlock' param to start fetching only from a certain block.

The way we fetch the past streams can be improved.

  • There's a linear increment in how the stream works, so you could just iterate them in batches using multicall for speed
  • We can add a native multicall-like search for live streams into the contract (maybe query 256 at a time)
  • Use the Graph?
@vany365 vany365 changed the title Refactor stream fetching in the SDK Refactor stream fetching in the SDK [SBK-347] Nov 7, 2023
@alexisnsns alexisnsns added the enhancement New feature or request label Nov 7, 2023
@alexisnsns alexisnsns self-assigned this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant