diff --git a/runtime/stout/src/contracts.rs b/runtime/stout/src/contracts.rs index 86dfa248..89393917 100644 --- a/runtime/stout/src/contracts.rs +++ b/runtime/stout/src/contracts.rs @@ -20,9 +20,11 @@ use frame_support::{ traits::{ConstU32, Nothing}, }; use pallet_contracts::{ - weights::SubstrateWeight, Config, DebugInfo, DefaultAddressGenerator, Frame, NoopMigration, - Schedule, + weights::SubstrateWeight, Config, DebugInfo, DefaultAddressGenerator, Frame, Schedule, }; + +#[cfg(feature = "runtime-benchmarks")] +use pallet_contracts::NoopMigration; pub use parachains_common::AVERAGE_ON_INITIALIZE_RATIO; use sp_core::ConstBool; diff --git a/runtime/trappist/src/contracts.rs b/runtime/trappist/src/contracts.rs index 7b25133a..891d4485 100644 --- a/runtime/trappist/src/contracts.rs +++ b/runtime/trappist/src/contracts.rs @@ -19,8 +19,11 @@ use frame_support::{ parameter_types, traits::{ConstBool, ConstU32, Nothing}, }; +#[cfg(feature = "runtime-benchmarks")] +use pallet_contracts::NoopMigration; use pallet_contracts::{ - Config, DebugInfo, DefaultAddressGenerator, Frame, NoopMigration, Schedule, + migration::{v10, v11, v12}, + Config, DebugInfo, DefaultAddressGenerator, Frame, Schedule, }; pub use parachains_common::AVERAGE_ON_INITIALIZE_RATIO; @@ -67,7 +70,7 @@ impl Config for Runtime { type UnsafeUnstableInterface = ConstBool; type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; #[cfg(not(feature = "runtime-benchmarks"))] - type Migrations = (); + type Migrations = (v10::Migration, v11::Migration, v12::Migration); #[cfg(feature = "runtime-benchmarks")] type Migrations = (NoopMigration<1>, NoopMigration<2>); } diff --git a/runtime/trappist/src/lib.rs b/runtime/trappist/src/lib.rs index bdb9e2fe..1246e167 100644 --- a/runtime/trappist/src/lib.rs +++ b/runtime/trappist/src/lib.rs @@ -125,7 +125,12 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - (migrations::SetStorageVersions, pallet_xcm::migration::v1::MigrateToV1), + ( + migrations::SetStorageVersions, + pallet_xcm::migration::v1::MigrateToV1, + pallet_collator_selection::migration::v1::MigrateToV1, + pallet_contracts::Migration, + ), >; impl_opaque_keys! { @@ -178,16 +183,18 @@ parameter_types! { // Configure FRAME pallets to include in runtime. impl frame_system::Config for Runtime { + type RuntimeEvent = RuntimeEvent; type BaseCallFilter = LockdownMode; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; + type Nonce = Nonce; type Hash = Hash; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = AccountIdLookup; - type RuntimeEvent = RuntimeEvent; + type Block = Block; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; @@ -199,8 +206,6 @@ impl frame_system::Config for Runtime { type SS58Prefix = ConstU16<42>; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; - type Nonce = Nonce; - type Block = Block; } impl pallet_timestamp::Config for Runtime { @@ -212,26 +217,26 @@ impl pallet_timestamp::Config for Runtime { } impl pallet_authorship::Config for Runtime { - type EventHandler = CollatorSelection; type FindAuthor = pallet_session::FindAccountFromAuthorIndex; + type EventHandler = CollatorSelection; } impl pallet_balances::Config for Runtime { + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_balances::WeightInfo; /// The type for recording an account's balance. type Balance = Balance; type DustRemoval = (); - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ConstU128; type AccountStore = System; - type WeightInfo = weights::pallet_balances::WeightInfo; - type MaxLocks = ConstU32<50>; - type MaxReserves = ConstU32<50>; type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = (); type FreezeIdentifier = (); + type MaxLocks = ConstU32<50>; + type MaxReserves = ConstU32<50>; type MaxHolds = ConstU32<0>; type MaxFreezes = ConstU32<0>; - type RuntimeHoldReason = (); } parameter_types! { @@ -372,6 +377,7 @@ pub type AssetBalance = Balance; impl pallet_assets::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = AssetBalance; + type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; type AssetId = AssetIdForTrustBackedAssets; type AssetIdParameter = parity_scale_codec::Compact; type Currency = Balances; @@ -386,7 +392,6 @@ impl pallet_assets::Config for Runtime { type Freezer = (); type Extra = (); type CallbackHandle = (); - type RemoveItemsLimit = frame_support::traits::ConstU32<1000>; type WeightInfo = weights::pallet_assets::WeightInfo; #[cfg(feature = "runtime-benchmarks")] type BenchmarkHelper = (); @@ -528,7 +533,6 @@ impl pallet_democracy::Config for Runtime { type InstantAllowed = InstantAllowed; type FastTrackVotingPeriod = FastTrackVotingPeriod; type CooloffPeriod = CooloffPeriod; - type SubmitOrigin = EnsureSigned; type MaxVotes = MaxVotes; type MaxProposals = MaxProposals; type MaxDeposits = ConstU32<100>; @@ -541,6 +545,7 @@ impl pallet_democracy::Config for Runtime { pallet_collective::EnsureProportionAtLeast; type ExternalDefaultOrigin = pallet_collective::EnsureProportionAtLeast; + type SubmitOrigin = EnsureSigned; type FastTrackOrigin = pallet_collective::EnsureProportionAtLeast; type InstantOrigin =