Error while subscribing transfer event
Description
When trying to subscribe the transfer events from rococo local chain, getting deserialise error
Codec(Error { cause: Some(Error { cause: None, desc: "Could not decode `RuntimeEvent`, variant doesn't exist" }), desc: "Could not decode `EventRecord::event`" })
Code Examle
let event_records = subscription
.next_events::<RuntimeEvent, Hash>()
.await
.unwrap()
.unwrap();
for event_record in &event_records {
println!("decoded: {:?} {:?}", event_record.phase, event_record.event);
match &event_record.event {
RuntimeEvent::Balances(balances_event) => {
println!(">>>>>>>>>> balances event: {:?}", balances_event);
match &balances_event {
pallet_balances::Event::Transfer { from, to, amount } => {
println!("Transactor: {:?}", from);
println!("Destination: {:?}", to);
println!("Value: {:?}", amount);
// return;
}
_ => {
debug!("ignoring unsupported balances event");
}
}
}
RuntimeEvent::System(system_event) => {
println!(">>>>>>>>>> system event: {:?}", system_event);
match &system_event {
frame_system::Event::ExtrinsicSuccess { dispatch_info } => {
println!("DispatchInfo: {:?}", dispatch_info);
// return;
}
_ => {
debug!("ignoring unsupported system event");
}
}
}
_ => debug!(
"ignoring unsupported module event: {:?}",
event_record.event
),
}
}
Running chain
docker run -p 9944:9944 parity/polkadot:latest --dev --rpc-external
I tried to reproduce your issue, but so far without success. Can you try the following:
- We use a different docker image for our tests:
paritypr/substrate:latest. Can you try with this one? - Can you try to pull a fresh version of
parity/polkadot:latest? Docker does not pull a new version if you have already one on your system - Can you specify which image/version you are using exactly?
@Niederb sure, i will try these images, i tried latest version of polkadot image. i will update and try it again and get back to you, Thank you
@shanithkk Does it work with the other images? Then I would close this issue
@Niederb still i'm getting error while using parity/polkadot latest image
@Niederb tested with provided image "paritypr/substrate:latest". works fine for me but parity/polkadot image is not working as expected
Glad to hear that it works with paritypr/substrate:latest. Do you know what kind of event causes the crash?
@shanithkk Is this still a problem for you? Otherwise I will close this issue
This issue should be fixed with #802, therefore I close this