Skip to content

Conversation

fubuloubu
Copy link
Member

What I did

Adds support to silverback for event logs from any source

fixes: #99

How I did it

How to verify it

Requires ApeWorX/ape-tokens#55 to test example

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@fubuloubu fubuloubu requested a review from antazoey May 5, 2025 20:21
@fubuloubu fubuloubu marked this pull request as draft May 5, 2025 20:21
@fubuloubu
Copy link
Member Author

In draft until ApeWorX/ape-tokens#55 lands so that example works

Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sick

self.poll_settings[key] = {"new_block_timeout": new_block_timeout}

if start_block is not None:
if key in self.poll_settings:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Several spots can be cleaned up using .setdefault(), e.g.:

self.poll_settings.setdefault(key, {})
self.poll_settings[key]["start_block"] = start_block

Copy link
Member Author

@fubuloubu fubuloubu May 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I've been trying to migrate this code into Ape, into new ProviderAPI.aiter_logs/ProviderAPI.aiter_blocks methods that can go figure out how to configure using websocket or http polling based on how it is configured to operate (if it has websockets/IPC or not). Then I can consolidate the WebsocketRunner and PollingRunner classes into one LiveRunner class

@fubuloubu fubuloubu marked this pull request as ready for review May 6, 2025 03:45
@fubuloubu fubuloubu merged commit 0f83a78 into main May 6, 2025
27 checks passed
@fubuloubu fubuloubu deleted the feat/support-anon-logs branch May 6, 2025 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subscribe only to event signature
2 participants