-
Notifications
You must be signed in to change notification settings - Fork 126
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
Add next_events_from_metadata
and rename next_event
#545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it is not clear what this PR wants to do. Can you clarify?
Why does this PR close #440?
Do we still need RuntimeEvent
? When should we use next_events
, when next_events_from_metadata
?
@@ -24,9 +24,6 @@ use sp_core::H256; | |||
|
|||
/// A collection of events obtained from a block, bundled with the necessary | |||
/// information needed to decode and iterate over them. | |||
// | |||
// In subxt, this was generic over a `Config` type, but it's sole usage was to derive the | |||
// hash type. We omitted this here and use the `ac_primitives::Hash` instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed because outdated. There's no ac_primitves::Hash Type. No need to point out what Subxt did, because Subxt is constantly evolving as well.
I updated the PR description, better now? Regarding the question when to use what: is the comment substrate-api-client/src/api/rpc_api/events.rs Lines 124 to 128 in 7536d15
not explanatory enough? |
Check out #440 (comment) for more elaborate explanation. |
It suggests to use every time you can |
next_events_from_metadata
next_events_from_metadata
and rename next_event
Updated the
EventSubscription
Wrapper to support decoding events from the metadata:next_events_from_metadata
to derive events from metadata instead ofRuntimeEvents
generated by theconstruct_runtime
macro of Substratenext_event
to more appropriatenext_events
.metadata
field for event derivation from metadata (needed bynext_events_from_metadata
). Therefore, theFrom
derivation fromSubscription
is not possible any more (needs metadata) and was removed.closes #440