You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently not possible to parse the runtime::Event type. To hack around this it is possible to skip the Phase like such:
letmut data = event.bytes();let event = <(subxt::events::Phase, kusama::Event)>::decode(&mut data).map(|r| r.1);
But it would be nice to have something like as_runtime_event. I am not sure if as_root_event is supposed to do that, but it does not do.
The advantage is that it would enable one to easily parse all events of a runtime, instead of just pallet specific ones.
The text was updated successfully, but these errors were encountered:
.as_root_event() is expected to do this, but it looks like it's given too many bytes at the moment so it's broken. We should fix that, and then what you'd like to do will be possible with that function.
That said, what you've done should work. If you find that it works sometimes and fails other times, it may be because there is some difference between the metadata you used to codegen and the current state of the node?
In any case, we will enmdeavour to fix .as_root_event() so that it does what you expect!
It is currently not possible to parse the
runtime::Event
type. To hack around this it is possible to skip thePhase
like such:But it would be nice to have something like
as_runtime_event
. I am not sure ifas_root_event
is supposed to do that, but it does not do.The advantage is that it would enable one to easily parse all events of a runtime, instead of just pallet specific ones.
The text was updated successfully, but these errors were encountered: