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

Extend the new api.blocks() to be the primary way to subscribe and fetch blocks/extrinsics/events #691

Merged
merged 14 commits into from Nov 1, 2022

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Oct 18, 2022

Also:

  • Remove the Extrinsic type from config (We just treat every extrinsic as a collection of bytes at the moment, and if/when we want to decode them properly we can treat them like events and ask for a type/shape at decode time).
  • Tie tx submission in to this; both extrinsics in blocks and tx submission have associated events.
  • Add an example subscribing to finalized blocks and printing some details of them.
  • Make api.blocks().subscribe_*() the only way to subscribe to streams of things (removing similar functionality from Events to avoid lots of repetition and simplify the API surface).
  • Remove the FilterEvents stuff; it makes much more sense to ask for events via this new blocks API (either for the entire block or for specific extrinsics), and it was all rather complicated.

@jsdw jsdw marked this pull request as ready for review October 19, 2022 16:19
@jsdw jsdw changed the title Add functionality to get/subscribe to blocks and extrinsics Extend the new api.blocks() to be the primary way to subscribe and fetch blocks/extrinsics/events Oct 21, 2022
Copy link
Member

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM

subxt/src/blocks/block_types.rs Outdated Show resolved Hide resolved
Co-authored-by: Andrew Jones <ascjones@gmail.com>
@ascjones
Copy link
Member

New scale-info 2.3 has broken the CI: see #704

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.

None yet

4 participants