From 1a5e74ac7642ef816d9147015e2fc8961722677d Mon Sep 17 00:00:00 2001 From: Yuanchao Sun Date: Fri, 31 Jan 2020 19:40:45 +0800 Subject: [PATCH] Update substrate, bump metadata version to v11 (#67) --- src/extrinsic.rs | 8 ++++++++ src/metadata.rs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/extrinsic.rs b/src/extrinsic.rs index 4c51aca9ec..9429869fb3 100644 --- a/src/extrinsic.rs +++ b/src/extrinsic.rs @@ -63,6 +63,7 @@ impl SignedExtension for CheckVersion where T: System + Send + Sync, { + const IDENTIFIER: &'static str = "CheckVersion"; type AccountId = u64; type Call = (); type AdditionalSigned = u32; @@ -93,6 +94,7 @@ impl SignedExtension for CheckGenesis where T: System + Send + Sync, { + const IDENTIFIER: &'static str = "CheckGenesis"; type AccountId = u64; type Call = (); type AdditionalSigned = T::Hash; @@ -125,6 +127,7 @@ impl SignedExtension for CheckEra where T: System + Send + Sync, { + const IDENTIFIER: &'static str = "CheckEra"; type AccountId = u64; type Call = (); type AdditionalSigned = T::Hash; @@ -145,6 +148,7 @@ impl SignedExtension for CheckNonce where T: System + Send + Sync, { + const IDENTIFIER: &'static str = "CheckNonce"; type AccountId = u64; type Call = (); type AdditionalSigned = (); @@ -165,6 +169,7 @@ impl SignedExtension for CheckWeight where T: System + Send + Sync, { + const IDENTIFIER: &'static str = "CheckWeight"; type AccountId = u64; type Call = (); type AdditionalSigned = (); @@ -186,6 +191,7 @@ impl SignedExtension for ChargeTransactionPayment where T: Balances + Send + Sync, { + const IDENTIFIER: &'static str = "ChargeTransactionPayment"; type AccountId = u64; type Call = (); type AdditionalSigned = (); @@ -206,6 +212,7 @@ impl SignedExtension for CheckBlockGasLimit where T: System + Send + Sync, { + const IDENTIFIER: &'static str = "CheckBlockGasLimit"; type AccountId = u64; type Call = (); type AdditionalSigned = (); @@ -266,6 +273,7 @@ impl SignedExtra for DefaultExtra { } impl SignedExtension for DefaultExtra { + const IDENTIFIER: &'static str = "DefaultExtra"; type AccountId = T::AccountId; type Call = (); type AdditionalSigned = diff --git a/src/metadata.rs b/src/metadata.rs index c451535d42..f71a1112ab 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -355,7 +355,7 @@ impl TryFrom for Metadata { return Err(ConversionError::InvalidPrefix.into()) } let meta = match metadata.1 { - RuntimeMetadata::V10(meta) => meta, + RuntimeMetadata::V11(meta) => meta, _ => return Err(ConversionError::InvalidVersion.into()), }; let mut modules = HashMap::new();