diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 0c9f9461f7f4..51e317b4866a 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -45,7 +45,8 @@ use frame_support::{ genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, TransformOrigin, + fungible::HoldConsideration, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + InstanceFilter, LinearStoragePrice, TransformOrigin, ZeroFootprintOr, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, PalletId, @@ -549,28 +550,41 @@ impl InstanceFilter for ProxyType { parameter_types! { // One storage item; key size 32, value size 8; . pub const ProxyDepositBase: Balance = deposit(1, 40); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const ProxyDepositPerByte: Balance = deposit(0, 1); pub const MaxProxies: u16 = 32; - // One storage item; key size 32, value size 16 pub const AnnouncementDepositBase: Balance = deposit(1, 48); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const AnnouncementDepositPerByte: Balance = deposit(0, 1); pub const MaxPending: u16 = 32; + pub const ProxyHoldReason: RuntimeHoldReason = RuntimeHoldReason::Proxy(pallet_proxy::HoldReason::Proxy); + pub const AnnouncementHoldReason: RuntimeHoldReason = RuntimeHoldReason::Proxy(pallet_proxy::HoldReason::Announcement); } impl pallet_proxy::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; - type Currency = Balances; type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; type MaxProxies = MaxProxies; type WeightInfo = weights::pallet_proxy::WeightInfo; type MaxPending = MaxPending; type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; + type ProxyConsideration = HoldConsideration< + AccountId, + Balances, + ProxyHoldReason, + ZeroFootprintOr< + LinearStoragePrice, + Balance, + >, + >; + type AnnouncementConsideration = HoldConsideration< + AccountId, + Balances, + ProxyHoldReason, + ZeroFootprintOr< + LinearStoragePrice, + Balance, + >, + >; } impl pallet_utility::Config for Runtime { diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 614eae895a74..3edaeda0dc47 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -45,7 +45,8 @@ use frame_support::{ genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, TransformOrigin, + fungible::HoldConsideration, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + InstanceFilter, LinearStoragePrice, TransformOrigin, ZeroFootprintOr, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, PalletId, @@ -549,28 +550,42 @@ impl InstanceFilter for ProxyType { parameter_types! { // One storage item; key size 32, value size 8; . pub const ProxyDepositBase: Balance = deposit(1, 40); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const ProxyDepositPerByte: Balance = deposit(0, 1); pub const MaxProxies: u16 = 32; // One storage item; key size 32, value size 16 pub const AnnouncementDepositBase: Balance = deposit(1, 48); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const AnnouncementDepositPerByte: Balance = deposit(0, 1); pub const MaxPending: u16 = 32; + pub const ProxyHoldReason: RuntimeHoldReason = RuntimeHoldReason::Proxy(pallet_proxy::HoldReason::Proxy); + pub const AnnouncementHoldReason: RuntimeHoldReason = RuntimeHoldReason::Proxy(pallet_proxy::HoldReason::Announcement); } impl pallet_proxy::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; - type Currency = Balances; type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; type MaxProxies = MaxProxies; type WeightInfo = weights::pallet_proxy::WeightInfo; type MaxPending = MaxPending; type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; + type ProxyConsideration = HoldConsideration< + AccountId, + Balances, + ProxyHoldReason, + ZeroFootprintOr< + LinearStoragePrice, + Balance, + >, + >; + type AnnouncementConsideration = HoldConsideration< + AccountId, + Balances, + ProxyHoldReason, + ZeroFootprintOr< + LinearStoragePrice, + Balance, + >, + >; } impl pallet_utility::Config for Runtime { diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 9b251a90d678..6fec26dbc26f 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -34,8 +34,8 @@ use frame_support::{ genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, InstanceFilter, - TransformOrigin, + fungible::HoldConsideration, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, InstanceFilter, LinearStoragePrice, TransformOrigin, ZeroFootprintOr, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, PalletId, @@ -492,28 +492,42 @@ impl InstanceFilter for ProxyType { parameter_types! { // One storage item; key size 32, value size 8. pub const ProxyDepositBase: Balance = deposit(1, 40); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const ProxyDepositPerByte: Balance = deposit(0, 1); pub const MaxProxies: u16 = 32; // One storage item; key size 32, value size 16. pub const AnnouncementDepositBase: Balance = deposit(1, 48); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const AnnouncementDepositPerByte: Balance = deposit(0, 1); pub const MaxPending: u16 = 32; + pub const ProxyHoldReason: RuntimeHoldReason = RuntimeHoldReason::Proxy(pallet_proxy::HoldReason::Proxy); + pub const AnnouncementHoldReason: RuntimeHoldReason = RuntimeHoldReason::Proxy(pallet_proxy::HoldReason::Announcement); } impl pallet_proxy::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; - type Currency = Balances; type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; type MaxProxies = MaxProxies; type WeightInfo = weights::pallet_proxy::WeightInfo; type MaxPending = MaxPending; type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; + type ProxyConsideration = HoldConsideration< + AccountId, + Balances, + ProxyHoldReason, + ZeroFootprintOr< + LinearStoragePrice, + Balance, + >, + >; + type AnnouncementConsideration = HoldConsideration< + AccountId, + Balances, + ProxyHoldReason, + ZeroFootprintOr< + LinearStoragePrice, + Balance, + >, + >; } impl pallet_utility::Config for Runtime { diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 07bfba92c933..6c16531588ae 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -34,8 +34,8 @@ use frame_support::{ genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ - ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything, InstanceFilter, - TransformOrigin, + fungible::HoldConsideration, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, InstanceFilter, LinearStoragePrice, TransformOrigin, ZeroFootprintOr, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, PalletId, @@ -493,27 +493,42 @@ parameter_types! { // One storage item; key size 32, value size 8. pub const ProxyDepositBase: Balance = deposit(1, 40); // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const ProxyDepositPerByte: Balance = deposit(0, 1); pub const MaxProxies: u16 = 32; // One storage item; key size 32, value size 16. pub const AnnouncementDepositBase: Balance = deposit(1, 48); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const AnnouncementDepositPerByte: Balance = deposit(0, 1); pub const MaxPending: u16 = 32; + pub const ProxyHoldReason: RuntimeHoldReason = RuntimeHoldReason::Proxy(pallet_proxy::HoldReason::Proxy); + pub const AnnouncementHoldReason: RuntimeHoldReason = RuntimeHoldReason::Proxy(pallet_proxy::HoldReason::Announcement); } impl pallet_proxy::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; - type Currency = Balances; type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; type MaxProxies = MaxProxies; type WeightInfo = weights::pallet_proxy::WeightInfo; type MaxPending = MaxPending; type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; + type ProxyConsideration = HoldConsideration< + AccountId, + Balances, + ProxyHoldReason, + ZeroFootprintOr< + LinearStoragePrice, + Balance, + >, + >; + type AnnouncementConsideration = HoldConsideration< + AccountId, + Balances, + ProxyHoldReason, + ZeroFootprintOr< + LinearStoragePrice, + Balance, + >, + >; } impl pallet_utility::Config for Runtime {