Update scale-info and parity-scale-codec requirements (#462)

* Update scale-info and parity-scale-codec requirements

* Update CHANGELOG

* Update frame-metadata

* Update bitvec

* Fix test

* Update bitvec event decoding

* More bitvec updates

* Update substrate primitives dependencies

* Fix up bitvec errors and decode error

* Fix up bitvec errors

* Update polkadot codegen
This commit is contained in:
Andrew Jones
2022-03-01 16:36:38 +00:00
committed by GitHub
parent 13347362d5
commit 11f24d78f7
12 changed files with 216 additions and 172 deletions
+4 -4
View File
@@ -12,17 +12,17 @@ description = "Generate an API for interacting with a substrate node from FRAME
[dependencies]
async-trait = "0.1.49"
codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive", "full", "bit-vec"] }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
darling = "0.13.0"
frame-metadata = "14.0"
frame-metadata = "15.0.0"
heck = "0.4.0"
proc-macro2 = "1.0.24"
proc-macro-crate = "0.1.5"
proc-macro-error = "1.0.4"
quote = "1.0.8"
syn = "1.0.58"
scale-info = { version = "1.0.0", features = ["bit-vec"] }
scale-info = { version = "2.0.0", features = ["bit-vec"] }
[dev-dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
pretty_assertions = "1.0.0"
+4 -4
View File
@@ -686,8 +686,8 @@ fn generate_bitvec() {
#[allow(unused)]
#[derive(TypeInfo)]
struct S {
lsb: BitVec<Lsb0, u8>,
msb: BitVec<Msb0, u16>,
lsb: BitVec<u8, Lsb0>,
msb: BitVec<u16, Msb0>,
}
let mut registry = Registry::new();
@@ -710,8 +710,8 @@ fn generate_bitvec() {
use super::root;
#[derive(::subxt::codec::Encode, ::subxt::codec::Decode, Debug)]
pub struct S {
pub lsb: ::subxt::bitvec::vec::BitVec<root::bitvec::order::Lsb0, ::core::primitive::u8>,
pub msb: ::subxt::bitvec::vec::BitVec<root::bitvec::order::Msb0, ::core::primitive::u16>,
pub lsb: ::subxt::bitvec::vec::BitVec<::core::primitive::u8, root::bitvec::order::Lsb0>,
pub msb: ::subxt::bitvec::vec::BitVec<::core::primitive::u16, root::bitvec::order::Msb0>,
}
}
}
+1 -1
View File
@@ -179,7 +179,7 @@ impl TypePathType {
let bit_order_type = &self.params[0];
let bit_store_type = &self.params[1];
let type_path = parse_quote! { ::subxt::bitvec::vec::BitVec<#bit_order_type, #bit_store_type> };
let type_path = parse_quote! { ::subxt::bitvec::vec::BitVec<#bit_store_type, #bit_order_type> };
syn::Type::Path(type_path)
}