Skip to content

Commit fe64bc8

Browse files
ntn-x2Ad96el
andauthored
chore: update Polkadot dependencies to 0.9.39 (#500)
Fixes #495. Since the `wasmtime` dependency has been bumped from 1.x to 6.x, the old nightly was not good anymore since some inline stuff the new crate is using was still not stable back then. Hence, I bumped the nightly to a more recent version. Nevertheless, it cannot be TOO recent because of [this issue](paritytech/substrate#13636) (which maybe has been fixed in 0.9.40 @weichweich?). Anyway, updating to the new toolchain version added a whole bunch of Clippy warnings which I also addressed in this PR, among which there was one about the wrong declaration of the `parity-scale-codec` package, which I have now used with its original name everywhere, instead of aliasing it to `codec`. --------- Co-authored-by: Adel Golghalyani <[email protected]>
1 parent 43869a2 commit fe64bc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2121
-1668
lines changed

Cargo.lock

Lines changed: 512 additions & 539 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 103 additions & 104 deletions
Large diffs are not rendered by default.

crates/assets/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ hex-literal.workspace = true
1818
log.workspace = true
1919

2020
# Parity dependencies
21-
codec = {package = "parity-scale-codec", workspace = true, features = ["derive"]}
21+
parity-scale-codec = {workspace = true, features = ["derive"]}
2222
scale-info = {workspace = true, features = ["derive"]}
2323

2424
# Substrate dependencies
@@ -29,7 +29,7 @@ sp-std.workspace = true
2929
[features]
3030
default = ["std"]
3131
std = [
32-
"codec/std",
32+
"parity-scale-codec/std",
3333
"hex/std",
3434
"log/std",
3535
"scale-info/std",

crates/assets/src/asset.rs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub use v1::*;
2323
pub mod v1 {
2424
use crate::errors::asset::{Error, IdentifierError, NamespaceError, ReferenceError};
2525

26-
use codec::{Decode, Encode, MaxEncodedLen};
26+
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
2727
use scale_info::TypeInfo;
2828

2929
use core::{format_args, str};
@@ -34,32 +34,32 @@ pub mod v1 {
3434

3535
/// The minimum length, including separator symbols, an asset ID can have
3636
/// according to the minimum values defined by the CAIP-19 definition.
37-
pub const MINIMUM_ASSET_ID_LENGTH: usize = MINIMUM_NAMESPACE_LENGTH + 1 + MINIMUM_REFERENCE_LENGTH;
37+
pub const MINIMUM_ASSET_ID_LENGTH: usize = MINIMUM_ASSET_NAMESPACE_LENGTH + 1 + MINIMUM_ASSET_REFERENCE_LENGTH;
3838
/// The maximum length, including separator symbols, an asset ID can have
3939
/// according to the minimum values defined by the CAIP-19 definition.
4040
pub const MAXIMUM_ASSET_ID_LENGTH: usize =
41-
MAXIMUM_NAMESPACE_LENGTH + 1 + MAXIMUM_REFERENCE_LENGTH + 1 + MAXIMUM_IDENTIFIER_LENGTH;
41+
MAXIMUM_NAMESPACE_LENGTH + 1 + MAXIMUM_ASSET_REFERENCE_LENGTH + 1 + MAXIMUM_ASSET_IDENTIFIER_LENGTH;
4242

4343
/// The minimum length of a valid asset ID namespace.
44-
pub const MINIMUM_NAMESPACE_LENGTH: usize = 3;
44+
pub const MINIMUM_ASSET_NAMESPACE_LENGTH: usize = 3;
4545
/// The maximum length of a valid asset ID namespace.
4646
pub const MAXIMUM_NAMESPACE_LENGTH: usize = 8;
47-
const MAXIMUM_NAMESPACE_LENGTH_U32: u32 = MAXIMUM_NAMESPACE_LENGTH as u32;
47+
const MAXIMUM_ASSET_NAMESPACE_LENGTH_U32: u32 = MAXIMUM_NAMESPACE_LENGTH as u32;
4848
/// The minimum length of a valid asset ID reference.
49-
pub const MINIMUM_REFERENCE_LENGTH: usize = 1;
49+
pub const MINIMUM_ASSET_REFERENCE_LENGTH: usize = 1;
5050
/// The maximum length of a valid asset ID reference.
51-
pub const MAXIMUM_REFERENCE_LENGTH: usize = 128;
52-
const MAXIMUM_REFERENCE_LENGTH_U32: u32 = MAXIMUM_REFERENCE_LENGTH as u32;
51+
pub const MAXIMUM_ASSET_REFERENCE_LENGTH: usize = 128;
52+
const MAXIMUM_ASSET_REFERENCE_LENGTH_U32: u32 = MAXIMUM_ASSET_REFERENCE_LENGTH as u32;
5353
/// The minimum length of a valid asset ID identifier.
54-
pub const MINIMUM_IDENTIFIER_LENGTH: usize = 1;
54+
pub const MINIMUM_ASSET_IDENTIFIER_LENGTH: usize = 1;
5555
/// The maximum length of a valid asset ID reference.
56-
pub const MAXIMUM_IDENTIFIER_LENGTH: usize = 78;
57-
const MAXIMUM_IDENTIFIER_LENGTH_U32: u32 = MAXIMUM_IDENTIFIER_LENGTH as u32;
56+
pub const MAXIMUM_ASSET_IDENTIFIER_LENGTH: usize = 78;
57+
const MAXIMUM_ASSET_IDENTIFIER_LENGTH_U32: u32 = MAXIMUM_ASSET_IDENTIFIER_LENGTH as u32;
5858

5959
/// Separator between asset namespace and asset reference.
60-
const NAMESPACE_REFERENCE_SEPARATOR: u8 = b':';
60+
const ASSET_NAMESPACE_REFERENCE_SEPARATOR: u8 = b':';
6161
/// Separator between asset reference and asset identifier.
62-
const REFERENCE_IDENTIFIER_SEPARATOR: u8 = b':';
62+
const ASSET_REFERENCE_IDENTIFIER_SEPARATOR: u8 = b':';
6363

6464
/// Namespace for Slip44 assets.
6565
pub const SLIP44_NAMESPACE: &[u8] = b"slip44";
@@ -177,7 +177,7 @@ pub mod v1 {
177177
str::from_utf8(SLIP44_NAMESPACE)
178178
.expect("Conversion of Slip44 namespace to string should never fail.")
179179
)?;
180-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
180+
write!(f, "{}", char::from(ASSET_NAMESPACE_REFERENCE_SEPARATOR))?;
181181
reference.fmt(f)?;
182182
}
183183
Self::Erc20(reference) => {
@@ -187,7 +187,7 @@ pub mod v1 {
187187
str::from_utf8(ERC20_NAMESPACE)
188188
.expect("Conversion of Erc20 namespace to string should never fail.")
189189
)?;
190-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
190+
write!(f, "{}", char::from(ASSET_NAMESPACE_REFERENCE_SEPARATOR))?;
191191
reference.fmt(f)?;
192192
}
193193
Self::Erc721(EvmSmartContractNonFungibleReference(reference, identifier)) => {
@@ -197,10 +197,10 @@ pub mod v1 {
197197
str::from_utf8(ERC721_NAMESPACE)
198198
.expect("Conversion of Erc721 namespace to string should never fail.")
199199
)?;
200-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
200+
write!(f, "{}", char::from(ASSET_NAMESPACE_REFERENCE_SEPARATOR))?;
201201
reference.fmt(f)?;
202202
if let Some(id) = identifier {
203-
write!(f, "{}", char::from(REFERENCE_IDENTIFIER_SEPARATOR))?;
203+
write!(f, "{}", char::from(ASSET_REFERENCE_IDENTIFIER_SEPARATOR))?;
204204
id.fmt(f)?;
205205
}
206206
}
@@ -211,10 +211,10 @@ pub mod v1 {
211211
str::from_utf8(ERC1155_NAMESPACE)
212212
.expect("Conversion of Erc1155 namespace to string should never fail.")
213213
)?;
214-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
214+
write!(f, "{}", char::from(ASSET_NAMESPACE_REFERENCE_SEPARATOR))?;
215215
reference.fmt(f)?;
216216
if let Some(id) = identifier {
217-
write!(f, "{}", char::from(REFERENCE_IDENTIFIER_SEPARATOR))?;
217+
write!(f, "{}", char::from(ASSET_REFERENCE_IDENTIFIER_SEPARATOR))?;
218218
id.fmt(f)?;
219219
}
220220
}
@@ -224,10 +224,10 @@ pub mod v1 {
224224
id,
225225
}) => {
226226
namespace.fmt(f)?;
227-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
227+
write!(f, "{}", char::from(ASSET_NAMESPACE_REFERENCE_SEPARATOR))?;
228228
reference.fmt(f)?;
229229
if let Some(identifier) = id {
230-
write!(f, "{}", char::from(REFERENCE_IDENTIFIER_SEPARATOR))?;
230+
write!(f, "{}", char::from(ASSET_REFERENCE_IDENTIFIER_SEPARATOR))?;
231231
identifier.fmt(f)?;
232232
}
233233
}
@@ -238,7 +238,7 @@ pub mod v1 {
238238

239239
const fn check_namespace_length_bounds(namespace: &[u8]) -> Result<(), NamespaceError> {
240240
let namespace_length = namespace.len();
241-
if namespace_length < MINIMUM_NAMESPACE_LENGTH {
241+
if namespace_length < MINIMUM_ASSET_NAMESPACE_LENGTH {
242242
Err(NamespaceError::TooShort)
243243
} else if namespace_length > MAXIMUM_NAMESPACE_LENGTH {
244244
Err(NamespaceError::TooLong)
@@ -249,9 +249,9 @@ pub mod v1 {
249249

250250
const fn check_reference_length_bounds(reference: &[u8]) -> Result<(), ReferenceError> {
251251
let reference_length = reference.len();
252-
if reference_length < MINIMUM_REFERENCE_LENGTH {
252+
if reference_length < MINIMUM_ASSET_REFERENCE_LENGTH {
253253
Err(ReferenceError::TooShort)
254-
} else if reference_length > MAXIMUM_REFERENCE_LENGTH {
254+
} else if reference_length > MAXIMUM_ASSET_REFERENCE_LENGTH {
255255
Err(ReferenceError::TooLong)
256256
} else {
257257
Ok(())
@@ -260,9 +260,9 @@ pub mod v1 {
260260

261261
const fn check_identifier_length_bounds(identifier: &[u8]) -> Result<(), IdentifierError> {
262262
let identifier_length = identifier.len();
263-
if identifier_length < MINIMUM_IDENTIFIER_LENGTH {
263+
if identifier_length < MINIMUM_ASSET_IDENTIFIER_LENGTH {
264264
Err(IdentifierError::TooShort)
265-
} else if identifier_length > MAXIMUM_IDENTIFIER_LENGTH {
265+
} else if identifier_length > MAXIMUM_ASSET_IDENTIFIER_LENGTH {
266266
Err(IdentifierError::TooLong)
267267
} else {
268268
Ok(())
@@ -272,12 +272,12 @@ pub mod v1 {
272272
/// Split the given input into its components, i.e., namespace, reference,
273273
/// and identifier, if the proper separators are found.
274274
fn split_components(input: &[u8]) -> AssetComponents {
275-
let mut split = input.splitn(2, |c| *c == NAMESPACE_REFERENCE_SEPARATOR);
275+
let mut split = input.splitn(2, |c| *c == ASSET_NAMESPACE_REFERENCE_SEPARATOR);
276276
let (namespace, reference) = (split.next(), split.next());
277277

278278
// Split the remaining reference to extract the identifier, if present
279279
let (reference, identifier) = if let Some(r) = reference {
280-
let mut split = r.splitn(2, |c| *c == REFERENCE_IDENTIFIER_SEPARATOR);
280+
let mut split = r.splitn(2, |c| *c == ASSET_REFERENCE_IDENTIFIER_SEPARATOR);
281281
// Split the reference further, if present
282282
(split.next(), split.next())
283283
} else {
@@ -442,7 +442,7 @@ pub mod v1 {
442442
/// identifier without applying any special parsing/decoding logic.
443443
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
444444
pub struct EvmSmartContractNonFungibleIdentifier(
445-
pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_IDENTIFIER_LENGTH_U32>>,
445+
pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_ASSET_IDENTIFIER_LENGTH_U32>>,
446446
);
447447

448448
impl EvmSmartContractNonFungibleIdentifier {
@@ -456,7 +456,7 @@ pub mod v1 {
456456
check_identifier_length_bounds(input)?;
457457

458458
input.iter().try_for_each(|c| {
459-
if !(b'0'..=b'9').contains(c) {
459+
if !c.is_ascii_digit() {
460460
log::trace!("Provided input has some invalid values as expected by a smart contract-based asset identifier.");
461461
Err(IdentifierError::InvalidFormat)
462462
} else {
@@ -542,7 +542,7 @@ pub mod v1 {
542542
/// It stores the provided UTF8-encoded namespace without trying to apply
543543
/// any parsing/decoding logic.
544544
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
545-
pub struct GenericAssetNamespace(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_NAMESPACE_LENGTH_U32>>);
545+
pub struct GenericAssetNamespace(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_ASSET_NAMESPACE_LENGTH_U32>>);
546546

547547
impl GenericAssetNamespace {
548548
/// Parse a generic UTF8-encoded asset namespace, failing if the input
@@ -591,7 +591,7 @@ pub mod v1 {
591591

592592
/// A generic asset reference as defined in the [CAIP-19 spec](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md).
593593
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
594-
pub struct GenericAssetReference(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_REFERENCE_LENGTH_U32>>);
594+
pub struct GenericAssetReference(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_ASSET_REFERENCE_LENGTH_U32>>);
595595

596596
impl GenericAssetReference {
597597
/// Parse a generic UTF8-encoded asset reference, failing if the input
@@ -640,7 +640,7 @@ pub mod v1 {
640640

641641
/// A generic asset identifier as defined in the [CAIP-19 spec](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md).
642642
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
643-
pub struct GenericAssetIdentifier(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_IDENTIFIER_LENGTH_U32>>);
643+
pub struct GenericAssetIdentifier(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_ASSET_IDENTIFIER_LENGTH_U32>>);
644644

645645
impl GenericAssetIdentifier {
646646
/// Parse a generic UTF8-encoded asset identifier, failing if the input

crates/assets/src/chain.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,32 @@ mod v1 {
2828

2929
use core::str;
3030

31-
use codec::{Decode, Encode, MaxEncodedLen};
31+
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
3232
use scale_info::TypeInfo;
3333

3434
use frame_support::{sp_runtime::RuntimeDebug, traits::ConstU32, BoundedVec};
3535
use sp_std::{fmt::Display, vec, vec::Vec};
3636

3737
/// The minimum length, including separator symbols, a chain ID can have
3838
/// according to the minimum values defined by the CAIP-2 definition.
39-
pub const MINIMUM_CHAIN_ID_LENGTH: usize = MINIMUM_NAMESPACE_LENGTH + 1 + MINIMUM_REFERENCE_LENGTH;
39+
pub const MINIMUM_CHAIN_ID_LENGTH: usize = MINIMUM_CHAIN_NAMESPACE_LENGTH + 1 + MINIMUM_CHAIN_REFERENCE_LENGTH;
4040
/// The maximum length, including separator symbols, a chain ID can have
4141
/// according to the minimum values defined by the CAIP-2 definition.
42-
pub const MAXIMUM_CHAIN_ID_LENGTH: usize = MAXIMUM_NAMESPACE_LENGTH + 1 + MAXIMUM_REFERENCE_LENGTH;
42+
pub const MAXIMUM_CHAIN_ID_LENGTH: usize = MAXIMUM_CHAIN_NAMESPACE_LENGTH + 1 + MAXIMUM_CHAIN_REFERENCE_LENGTH;
4343

4444
/// The minimum length of a valid chain ID namespace.
45-
pub const MINIMUM_NAMESPACE_LENGTH: usize = 3;
45+
pub const MINIMUM_CHAIN_NAMESPACE_LENGTH: usize = 3;
4646
/// The maximum length of a valid chain ID namespace.
47-
pub const MAXIMUM_NAMESPACE_LENGTH: usize = 8;
48-
const MAXIMUM_NAMESPACE_LENGTH_U32: u32 = MAXIMUM_NAMESPACE_LENGTH as u32;
47+
pub const MAXIMUM_CHAIN_NAMESPACE_LENGTH: usize = 8;
48+
const MAXIMUM_CHAIN_NAMESPACE_LENGTH_U32: u32 = MAXIMUM_CHAIN_NAMESPACE_LENGTH as u32;
4949
/// The minimum length of a valid chain ID reference.
50-
pub const MINIMUM_REFERENCE_LENGTH: usize = 1;
50+
pub const MINIMUM_CHAIN_REFERENCE_LENGTH: usize = 1;
5151
/// The maximum length of a valid chain ID reference.
52-
pub const MAXIMUM_REFERENCE_LENGTH: usize = 32;
53-
const MAXIMUM_REFERENCE_LENGTH_U32: u32 = MAXIMUM_REFERENCE_LENGTH as u32;
52+
pub const MAXIMUM_CHAIN_REFERENCE_LENGTH: usize = 32;
53+
const MAXIMUM_CHAIN_REFERENCE_LENGTH_U32: u32 = MAXIMUM_CHAIN_REFERENCE_LENGTH as u32;
5454

5555
/// Separator between chain namespace and chain reference.
56-
const NAMESPACE_REFERENCE_SEPARATOR: u8 = b':';
56+
const CHAIN_NAMESPACE_REFERENCE_SEPARATOR: u8 = b':';
5757
/// Namespace for Eip155 chains.
5858
pub const EIP155_NAMESPACE: &[u8] = b"eip155";
5959
/// Namespace for Bip122 chains.
@@ -201,7 +201,7 @@ mod v1 {
201201
str::from_utf8(BIP122_NAMESPACE)
202202
.expect("Conversion of Bip122 namespace to string should never fail.")
203203
)?;
204-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
204+
write!(f, "{}", char::from(CHAIN_NAMESPACE_REFERENCE_SEPARATOR))?;
205205
reference.fmt(f)?;
206206
}
207207
Self::Eip155(reference) => {
@@ -211,7 +211,7 @@ mod v1 {
211211
str::from_utf8(EIP155_NAMESPACE)
212212
.expect("Conversion of Eip155 namespace to string should never fail.")
213213
)?;
214-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
214+
write!(f, "{}", char::from(CHAIN_NAMESPACE_REFERENCE_SEPARATOR))?;
215215
reference.fmt(f)?;
216216
}
217217
Self::Dotsama(reference) => {
@@ -221,7 +221,7 @@ mod v1 {
221221
str::from_utf8(DOTSAMA_NAMESPACE)
222222
.expect("Conversion of Dotsama namespace to string should never fail.")
223223
)?;
224-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
224+
write!(f, "{}", char::from(CHAIN_NAMESPACE_REFERENCE_SEPARATOR))?;
225225
reference.fmt(f)?;
226226
}
227227
Self::Solana(reference) => {
@@ -231,12 +231,12 @@ mod v1 {
231231
str::from_utf8(SOLANA_NAMESPACE)
232232
.expect("Conversion of Solana namespace to string should never fail.")
233233
)?;
234-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
234+
write!(f, "{}", char::from(CHAIN_NAMESPACE_REFERENCE_SEPARATOR))?;
235235
reference.fmt(f)?;
236236
}
237237
Self::Generic(GenericChainId { namespace, reference }) => {
238238
namespace.fmt(f)?;
239-
write!(f, "{}", char::from(NAMESPACE_REFERENCE_SEPARATOR))?;
239+
write!(f, "{}", char::from(CHAIN_NAMESPACE_REFERENCE_SEPARATOR))?;
240240
reference.fmt(f)?;
241241
}
242242
}
@@ -246,9 +246,9 @@ mod v1 {
246246

247247
const fn check_namespace_length_bounds(namespace: &[u8]) -> Result<(), NamespaceError> {
248248
let namespace_length = namespace.len();
249-
if namespace_length < MINIMUM_NAMESPACE_LENGTH {
249+
if namespace_length < MINIMUM_CHAIN_NAMESPACE_LENGTH {
250250
Err(NamespaceError::TooShort)
251-
} else if namespace_length > MAXIMUM_NAMESPACE_LENGTH {
251+
} else if namespace_length > MAXIMUM_CHAIN_NAMESPACE_LENGTH {
252252
Err(NamespaceError::TooLong)
253253
} else {
254254
Ok(())
@@ -257,9 +257,9 @@ mod v1 {
257257

258258
const fn check_reference_length_bounds(reference: &[u8]) -> Result<(), ReferenceError> {
259259
let reference_length = reference.len();
260-
if reference_length < MINIMUM_REFERENCE_LENGTH {
260+
if reference_length < MINIMUM_CHAIN_REFERENCE_LENGTH {
261261
Err(ReferenceError::TooShort)
262-
} else if reference_length > MAXIMUM_REFERENCE_LENGTH {
262+
} else if reference_length > MAXIMUM_CHAIN_REFERENCE_LENGTH {
263263
Err(ReferenceError::TooLong)
264264
} else {
265265
Ok(())
@@ -269,7 +269,7 @@ mod v1 {
269269
/// Split the given input into its components, i.e., namespace, and
270270
/// reference, if the proper separator is found.
271271
fn split_components(input: &[u8]) -> ChainComponents {
272-
let mut split = input.as_ref().splitn(2, |c| *c == NAMESPACE_REFERENCE_SEPARATOR);
272+
let mut split = input.as_ref().splitn(2, |c| *c == CHAIN_NAMESPACE_REFERENCE_SEPARATOR);
273273
ChainComponents {
274274
namespace: split.next(),
275275
reference: split.next(),
@@ -529,7 +529,7 @@ mod v1 {
529529
/// It stores the provided UTF8-encoded namespace without trying to apply
530530
/// any parsing/decoding logic.
531531
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
532-
pub struct GenericChainNamespace(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_NAMESPACE_LENGTH_U32>>);
532+
pub struct GenericChainNamespace(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_CHAIN_NAMESPACE_LENGTH_U32>>);
533533

534534
impl GenericChainNamespace {
535535
/// Parse a generic UTF8-encoded chain namespace, failing if the input
@@ -578,7 +578,7 @@ mod v1 {
578578

579579
/// A generic chain reference as defined in the [CAIP-2 spec](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md).
580580
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
581-
pub struct GenericChainReference(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_REFERENCE_LENGTH_U32>>);
581+
pub struct GenericChainReference(pub(crate) BoundedVec<u8, ConstU32<MAXIMUM_CHAIN_REFERENCE_LENGTH_U32>>);
582582

583583
impl GenericChainReference {
584584
/// Parse a generic UTF8-encoded chain reference, failing if the input

crates/assets/src/v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

1717
// If you feel like getting in touch with us, you can do so at [email protected]
18-
use codec::{Decode, Encode, MaxEncodedLen};
1918
use hex_literal::hex;
19+
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
2020
use scale_info::TypeInfo;
2121

2222
use frame_support::sp_runtime::RuntimeDebug;

nodes/parachain/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ substrate-build-script-utils.workspace = true
2121
[dependencies]
2222
# External dependencies
2323
clap = {workspace = true, features = ["derive"]}
24-
codec.workspace = true
24+
parity-scale-codec = {workspace = true, features = ["derive"]}
2525
hex-literal.workspace = true
2626
jsonrpsee = {workspace = true, features = ["server"]}
2727
log.workspace = true

0 commit comments

Comments
 (0)