mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 21:11:07 +00:00
Remove in-tree max-encoded-len and use the new SCALE codec crate instead (#9163)
* Update impl-codec to use new upstream MaxEncodedLen trait * Adapt crates to use the updated codec crate for `MaxEncodedLen` * Remove max-encoded-len crate altogether * Fix test compilation in `pallet-proxy` * reorganize import (#9186) * Fix remaining `MaxEncodedLen` imports * Fix remaining old usages of max-encoded-len crate * Fix UI test * Manually depend on new impl-codec to fix Polkadot companion build * Use newly released primitive-types v0.9.1 that has new codec impls * Make sure codec deps are up-to-date in crates that use them Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -13,14 +13,13 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["max-encoded-len"] }
|
||||
frame-support = { version = "3.0.0", default-features = false, path = "../support" }
|
||||
frame-system = { version = "3.0.0", default-features = false, path = "../system" }
|
||||
sp-core = { version = "3.0.0", default-features = false, path = "../../primitives/core" }
|
||||
sp-io = { version = "3.0.0", default-features = false, path = "../../primitives/io" }
|
||||
sp-runtime = { version = "3.0.0", default-features = false, path = "../../primitives/runtime" }
|
||||
sp-std = { version = "3.0.0", default-features = false, path = "../../primitives/std" }
|
||||
max-encoded-len = { version = "3.0.0", default-features = false, path = "../../max-encoded-len", features = [ "derive" ] }
|
||||
|
||||
frame-benchmarking = { version = "3.1.0", default-features = false, path = "../benchmarking", optional = true }
|
||||
|
||||
@@ -38,7 +37,6 @@ std = [
|
||||
"frame-system/std",
|
||||
"sp-std/std",
|
||||
"sp-io/std",
|
||||
"max-encoded-len/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"frame-benchmarking",
|
||||
|
||||
@@ -34,7 +34,7 @@ mod benchmarking;
|
||||
pub mod weights;
|
||||
|
||||
use sp_std::{prelude::*, convert::TryInto};
|
||||
use codec::{Encode, Decode};
|
||||
use codec::{Encode, Decode, MaxEncodedLen};
|
||||
use sp_io::hashing::blake2_256;
|
||||
use sp_runtime::{
|
||||
DispatchResult,
|
||||
@@ -45,7 +45,7 @@ use frame_support::{
|
||||
dispatch::{DispatchResultWithPostInfo, PostDispatchInfo},
|
||||
traits::{
|
||||
Get, ReservableCurrency, Currency, InstanceFilter, OriginTrait,
|
||||
IsType, IsSubType, MaxEncodedLen,
|
||||
IsType, IsSubType,
|
||||
},
|
||||
weights::GetDispatchInfo,
|
||||
};
|
||||
|
||||
@@ -102,10 +102,7 @@ parameter_types! {
|
||||
pub const AnnouncementDepositBase: u64 = 1;
|
||||
pub const AnnouncementDepositFactor: u64 = 1;
|
||||
}
|
||||
#[derive(
|
||||
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug,
|
||||
max_encoded_len::MaxEncodedLen,
|
||||
)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen)]
|
||||
pub enum ProxyType {
|
||||
Any,
|
||||
JustTransfer,
|
||||
|
||||
Reference in New Issue
Block a user