mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
Update parity-scale-codec to 2.0 (#7994)
* update cargo.toml * use 2.0 in mmmr
This commit is contained in:
committed by
GitHub
parent
bea4a6524d
commit
f48296e9ad
@@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
frame-metadata = { version = "12.0.0", default-features = false, path = "../metadata" }
|
||||
sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" }
|
||||
sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" }
|
||||
@@ -35,7 +35,7 @@ smallvec = "1.4.1"
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "0.6.1"
|
||||
frame-system = { version = "2.0.0", path = "../system" }
|
||||
parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] }
|
||||
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
|
||||
sp-api = { version = "2.0.0", default-features = false, path = "../../primitives/api" }
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ fn decl_outer_dispatch<'a>(
|
||||
.map(|module_declaration| {
|
||||
let module = &module_declaration.module;
|
||||
let name = &module_declaration.name;
|
||||
let index = module_declaration.index.to_string();
|
||||
let index = module_declaration.index;
|
||||
quote!(#[codec(index = #index)] #module::#name)
|
||||
});
|
||||
|
||||
@@ -381,14 +381,14 @@ fn decl_outer_origin<'a>(
|
||||
);
|
||||
return Err(syn::Error::new(module_declaration.name.span(), msg));
|
||||
}
|
||||
let index = module_declaration.index.to_string();
|
||||
let index = module_declaration.index;
|
||||
let tokens = quote!(#[codec(index = #index)] #module #instance #generics,);
|
||||
modules_tokens.extend(tokens);
|
||||
}
|
||||
}
|
||||
|
||||
let system_name = &system_module.module;
|
||||
let system_index = system_module.index.to_string();
|
||||
let system_index = system_module.index;
|
||||
|
||||
Ok(quote!(
|
||||
#scrate::impl_outer_origin! {
|
||||
@@ -422,7 +422,7 @@ fn decl_outer_event<'a>(
|
||||
return Err(syn::Error::new(module_declaration.name.span(), msg));
|
||||
}
|
||||
|
||||
let index = module_declaration.index.to_string();
|
||||
let index = module_declaration.index;
|
||||
let tokens = quote!(#[codec(index = #index)] #module #instance #generics,);
|
||||
modules_tokens.extend(tokens);
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@ mod tests {
|
||||
pub enum TestEventSystemRenamed for TestRuntime2 {
|
||||
system_renamed,
|
||||
event_module<T>,
|
||||
#[codec(index = "5")] event_module2<T>,
|
||||
#[codec(index = 5)] event_module2<T>,
|
||||
event_module3,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,9 +478,9 @@ mod tests {
|
||||
);
|
||||
|
||||
impl_outer_origin!(
|
||||
pub enum OriginIndices for TestRuntime where system = frame_system, system_index = "11" {
|
||||
pub enum OriginIndices for TestRuntime where system = frame_system, system_index = 11 {
|
||||
origin_with_generic<T>,
|
||||
#[codec(index = "10")] origin_without_generic,
|
||||
#[codec(index = 10)] origin_without_generic,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.101", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||
sp-io = { version = "2.0.0", path = "../../../primitives/io", default-features = false }
|
||||
sp-state-machine = { version = "0.8.0", optional = true, path = "../../../primitives/state-machine" }
|
||||
frame-support = { version = "2.0.0", default-features = false, path = "../" }
|
||||
|
||||
Reference in New Issue
Block a user