From effefdfc563bfd399dbcf395f5b3cd9010034cff Mon Sep 17 00:00:00 2001 From: Matija Petrunic Date: Mon, 24 Apr 2023 12:09:12 +0200 Subject: [PATCH 1/4] fix: avoid without storage info macro --- bridge/src/lib.rs | 1 - traits/src/lib.rs | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge/src/lib.rs b/bridge/src/lib.rs index 4f18391..af65ef9 100644 --- a/bridge/src/lib.rs +++ b/bridge/src/lib.rs @@ -62,7 +62,6 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::config] diff --git a/traits/src/lib.rs b/traits/src/lib.rs index 95035f6..8a3c1fe 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -3,7 +3,8 @@ #![cfg_attr(not(feature = "std"), no_std)] -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; +use frame_support::dispatch::TypeInfo; use primitive_types::{H160, U256}; use scale_info::TypeInfo; use sp_std::vec::Vec; @@ -22,7 +23,7 @@ pub enum TransferType { GenericTransfer, } -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode, TypeInfo, Copy, Default)] +#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode, TypeInfo, Copy, Default, MaxEncodedLen)] pub struct MpcAddress(pub [u8; 20]); pub trait ExtractDestinationData { From d45c98007461fc162b2d240d77ab907c42194634 Mon Sep 17 00:00:00 2001 From: Matija Petrunic Date: Mon, 24 Apr 2023 12:14:31 +0200 Subject: [PATCH 2/4] Remove extra import --- traits/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/traits/src/lib.rs b/traits/src/lib.rs index 8a3c1fe..78739f4 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -4,7 +4,6 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::dispatch::TypeInfo; use primitive_types::{H160, U256}; use scale_info::TypeInfo; use sp_std::vec::Vec; From 8ef9489c80189ec6e58677cb15879f2e4fbb6401 Mon Sep 17 00:00:00 2001 From: Matija Petrunic Date: Mon, 24 Apr 2023 12:16:32 +0200 Subject: [PATCH 3/4] Lint --- traits/src/lib.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/traits/src/lib.rs b/traits/src/lib.rs index 78739f4..e9f41aa 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -22,7 +22,20 @@ pub enum TransferType { GenericTransfer, } -#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Encode, Decode, TypeInfo, Copy, Default, MaxEncodedLen)] +#[derive( + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Debug, + Encode, + Decode, + TypeInfo, + Copy, + Default, + MaxEncodedLen, +)] pub struct MpcAddress(pub [u8; 20]); pub trait ExtractDestinationData { From 14d16a54c8e9db0f0d84aa8b41226abd333e161d Mon Sep 17 00:00:00 2001 From: Matija Petrunic Date: Mon, 24 Apr 2023 15:25:29 +0200 Subject: [PATCH 4/4] Remove without_storage_info from other pallets --- access-segregator/src/lib.rs | 2 +- basic-fee-handler/src/lib.rs | 1 - fee-handler-router/src/lib.rs | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/access-segregator/src/lib.rs b/access-segregator/src/lib.rs index f3ae8d8..b62df60 100644 --- a/access-segregator/src/lib.rs +++ b/access-segregator/src/lib.rs @@ -22,11 +22,11 @@ pub mod pallet { /// (pallet_index, extrinsic_name) => account #[pallet::storage] #[pallet::getter(fn extrinsic_access)] + #[pallet::unbounded] pub type ExtrinsicAccess = StorageMap<_, Twox64Concat, (u8, Vec), T::AccountId>; #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::config] diff --git a/basic-fee-handler/src/lib.rs b/basic-fee-handler/src/lib.rs index f1f8739..ae68d7d 100644 --- a/basic-fee-handler/src/lib.rs +++ b/basic-fee-handler/src/lib.rs @@ -27,7 +27,6 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::config] diff --git a/fee-handler-router/src/lib.rs b/fee-handler-router/src/lib.rs index 17925de..946e76b 100644 --- a/fee-handler-router/src/lib.rs +++ b/fee-handler-router/src/lib.rs @@ -18,7 +18,7 @@ pub mod pallet { use sygma_traits::{DomainID, FeeHandler}; use xcm::latest::AssetId; - #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug, MaxEncodedLen)] pub enum FeeHandlerType { BasicFeeHandler, DynamicFeeHandler, @@ -28,7 +28,6 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::config]