Remove decoding bit from "extrinsics" and reference decoding in "blocks" (#951)

* Remove decoding bits from 'tx' and reference decoding in 'blocks' instead

* newline

* doc and fmt fixes
This commit is contained in:
James Wilson
2023-05-11 13:12:51 +01:00
committed by GitHub
parent 3f16bb8d52
commit ae093bda7d
15 changed files with 65 additions and 210 deletions
+4
View File
@@ -31,8 +31,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let events = ext.events().await?;
let bytes_hex = format!("0x{}", hex::encode(ext.bytes()));
// See the API docs for more ways to decode extrinsics:
let decoded_ext = ext.as_root_extrinsic::<polkadot::Call>();
println!(" Extrinsic #{idx}:");
println!(" Bytes: {bytes_hex}");
println!(" Decoded: {decoded_ext:?}");
println!(" Events:");
for evt in events.iter() {