diff --git a/libs/types/src/locations.rs b/libs/types/src/locations.rs index 1229a4bd85..dffa5dd036 100644 --- a/libs/types/src/locations.rs +++ b/libs/types/src/locations.rs @@ -45,8 +45,9 @@ impl From for RestrictedTransferLocation { // type here -- 592 bytes, vs 40 bytes for domain address (next largest) Self::XCM(BlakeTwo256::hash(&vml.encode())) - // TODO-1.7: I'm afraid of locations translated from v3 to v4 will generate a different hash here. - // How this affect our current chain state? + // TODO-1.7: I'm afraid of locations translated from v3 to v4 will + // generate a different hash here. How this affect our current chain + // state? } } diff --git a/pallets/ethereum-transaction/src/mock.rs b/pallets/ethereum-transaction/src/mock.rs index 59108642ab..9d710bc537 100644 --- a/pallets/ethereum-transaction/src/mock.rs +++ b/pallets/ethereum-transaction/src/mock.rs @@ -143,11 +143,11 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = MockPrecompiles; type Runner = Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; type WithdrawOrigin = EnsureAddressNever; - type SuicideQuickClearLimit = ConstU32<0>; } parameter_types! { diff --git a/pallets/fees/src/mock.rs b/pallets/fees/src/mock.rs index 9ec8abaca1..b23145300a 100644 --- a/pallets/fees/src/mock.rs +++ b/pallets/fees/src/mock.rs @@ -61,12 +61,20 @@ parameter_types! { impl pallet_treasury::Config for Runtime { type ApproveOrigin = EnsureSignedBy; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = (); type BurnDestination = (); type Currency = Balances; type MaxApprovals = (); type OnSlash = Treasury; type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = ConstU64<10>; type ProposalBond = (); type ProposalBondMaximum = (); type ProposalBondMinimum = (); @@ -76,14 +84,6 @@ impl pallet_treasury::Config for Runtime { type SpendOrigin = EnsureSignedBy; type SpendPeriod = (); type WeightInfo = (); - type AssetKind = (); - type Beneficiary = Self::AccountId; - type BeneficiaryLookup = IdentityLookup; - type Paymaster = PayFromAccount; - type BalanceConverter = UnityAssetBalanceConversion; - type PayoutPeriod = ConstU64<10>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); } parameter_types! { diff --git a/pallets/liquidity-pools-gateway/routers/src/mock.rs b/pallets/liquidity-pools-gateway/routers/src/mock.rs index 4186fbb205..7671f21263 100644 --- a/pallets/liquidity-pools-gateway/routers/src/mock.rs +++ b/pallets/liquidity-pools-gateway/routers/src/mock.rs @@ -218,11 +218,11 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = MockPrecompiles; type Runner = Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; type WithdrawOrigin = EnsureAddressNever; - type SuicideQuickClearLimit = ConstU32<0>; } parameter_types! { @@ -454,6 +454,7 @@ impl pallet_xcm_transactor::Config for Runtime { type CurrencyIdToLocation = CurrencyIdToLocation; type DerivativeAddressRegistrationOrigin = EnsureRoot; type HrmpManipulatorOrigin = EnsureRoot; + type HrmpOpenOrigin = EnsureRoot; type MaxHrmpFee = MaxHrmpRelayFee; type ReserveProvider = orml_traits::location::RelativeReserveProvider; type RuntimeEvent = RuntimeEvent; @@ -462,7 +463,6 @@ impl pallet_xcm_transactor::Config for Runtime { type Transactor = Transactors; type UniversalLocation = UniversalLocation; type Weigher = DummyWeigher; - type HrmpOpenOrigin = EnsureRoot; type WeightInfo = (); type XcmSender = TestSendXcm; } diff --git a/pallets/restricted-xtokens/src/lib.rs b/pallets/restricted-xtokens/src/lib.rs index f725635739..8ee5e897a0 100644 --- a/pallets/restricted-xtokens/src/lib.rs +++ b/pallets/restricted-xtokens/src/lib.rs @@ -26,12 +26,12 @@ //! - `transfer_multiasset`: Transfer `Asset` assets. //! - `transfer_with_fee`: Transfer native currencies specifying the fee and //! amount as separate. -//! - `transfer_multiasset_with_fee`: Transfer `Asset` specifying the fee -//! and amount as separate. +//! - `transfer_multiasset_with_fee`: Transfer `Asset` specifying the fee and +//! amount as separate. //! - `transfer_multicurrencies`: Transfer several currencies specifying the //! item to be used as fee. -//! - `transfer_multiassets`: Transfer several `Asset` specifying the item -//! to be used as fee. +//! - `transfer_multiassets`: Transfer several `Asset` specifying the item to be +//! used as fee. #![cfg_attr(not(feature = "std"), no_std)] #![allow(clippy::from_over_into)] diff --git a/pallets/rewards/src/issuance.rs b/pallets/rewards/src/issuance.rs index 74abb5b78e..3e8b873abf 100644 --- a/pallets/rewards/src/issuance.rs +++ b/pallets/rewards/src/issuance.rs @@ -15,8 +15,7 @@ use cfg_traits::rewards::RewardIssuance; use frame_support::traits::{fungibles::Mutate, tokens::Preservation}; use parity_scale_codec::{Decode, Encode}; use sp_runtime::{traits::Get, DispatchResult}; -use sp_std::cmp::Eq; -use sp_std::marker::PhantomData; +use sp_std::{cmp::Eq, marker::PhantomData}; /// Enables rewarding out of thin air, e.g. via minting. pub struct MintReward( diff --git a/pallets/transfer-allowlist/src/mock.rs b/pallets/transfer-allowlist/src/mock.rs index cca1676076..4838949396 100644 --- a/pallets/transfer-allowlist/src/mock.rs +++ b/pallets/transfer-allowlist/src/mock.rs @@ -72,10 +72,10 @@ impl pallet_balances::Config for Runtime { impl transfer_allowlist::Config for Runtime { type CurrencyId = FilterCurrency; type Deposit = ConstU64<10>; - type RuntimeHoldReason = RuntimeHoldReason; type Location = Location; type ReserveCurrency = Balances; type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = (); } diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 909a39ef2c..bf248ca7cd 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -48,8 +48,7 @@ use cfg_types::{ }, }; use constants::currency::*; -use cumulus_primitives_core::AggregateMessageOrigin; -use cumulus_primitives_core::ParaId; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, @@ -98,7 +97,6 @@ use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use polkadot_runtime_common::{ prod_or_fast, xcm_sender::NoPriceForMessageDelivery, BlockHashCount, SlowAdjustingFeeUpdate, }; -use runtime_common::transfer_filter::PreNativeTransfer; use runtime_common::{ account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, @@ -116,7 +114,7 @@ use runtime_common::{ permissions::PoolAdminCheck, remarks::Remark, rewards::SingleCurrencyMovement, - transfer_filter::PreLpTransfer, + transfer_filter::{PreLpTransfer, PreNativeTransfer}, xcm::AccountIdToLocation, xcm_transactor, AllowanceDeposit, CurrencyED, }; @@ -246,11 +244,11 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type SS58Prefix = SS58Prefix; type SystemWeightInfo = weights::frame_system::WeightInfo; /// Get the chain's current version. type Version = Version; - type RuntimeTask = RuntimeTask; } /// Base Call Filter @@ -299,15 +297,16 @@ parameter_types! { impl cumulus_pallet_parachain_system::Config for Runtime { type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; + // Using weights for recomended hardware + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; type RuntimeEvent = RuntimeEvent; - type XcmpMessageHandler = XcmpQueue; - type WeightInfo = (); // Using weights for recomended hardware - type DmpQueue = frame_support::traits::EnqueueWithOrigin; type SelfParaId = staging_parachain_info::Pallet; + type WeightInfo = (); + type XcmpMessageHandler = XcmpQueue; } impl staging_parachain_info::Config for Runtime {} @@ -317,8 +316,9 @@ parameter_types! { } impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); // Using weights for recomended hardware + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + // Using weights for recomended hardware #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; @@ -328,12 +328,12 @@ impl pallet_message_queue::Config for Runtime { staging_xcm_executor::XcmExecutor, RuntimeCall, >; - type Size = u32; type QueueChangeHandler = NarrowOriginToSibling; type QueuePausedQuery = NarrowOriginToSibling; - type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; - type MaxStale = sp_core::ConstU32<8>; + type RuntimeEvent = RuntimeEvent; type ServiceWeight = MessageQueueServiceWeight; + type Size = u32; + type WeightInfo = (); } /// XCMP Queue is responsible to handle XCM messages coming directly from @@ -341,13 +341,13 @@ impl pallet_message_queue::Config for Runtime { impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type ControllerOrigin = EnsureRoot; - type XcmpQueue = TransformOrigin; - type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type PriceForSiblingDelivery = NoPriceForMessageDelivery; type RuntimeEvent = RuntimeEvent; type VersionWrapper = PolkadotXcm; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type XcmpQueue = TransformOrigin; } parameter_types! { @@ -404,8 +404,8 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; - type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -885,23 +885,23 @@ parameter_types! { impl pallet_identity::Config for Runtime { type BasicDeposit = BasicDeposit; - type Currency = Balances; type ByteDeposit = ByteDeposit; + type Currency = Balances; type ForceOrigin = EnsureRootOr>; type IdentityInformation = pallet_identity::legacy::IdentityInfo; type MaxRegistrars = MaxRegistrars; type MaxSubAccounts = MaxSubAccounts; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type OffchainSignature = Signature; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type RegistrarOrigin = EnsureRootOr>; type RuntimeEvent = RuntimeEvent; + type SigningPublicKey = ::Signer; type Slashed = Treasury; type SubAccountDeposit = SubAccountDeposit; - type OffchainSignature = Signature; - type SigningPublicKey = ::Signer; type UsernameAuthorityOrigin = EnsureRoot; - type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; - type MaxSuffixLength = ConstU32<7>; - type MaxUsernameLength = ConstU32<32>; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -912,12 +912,12 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { + type BlockNumberProvider = System; type BlockNumberToBalance = ConvertInto; type Currency = Balances; type MinVestedTransfer = MinVestedTransfer; type RuntimeEvent = RuntimeEvent; type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; - type BlockNumberProvider = System; type WeightInfo = weights::pallet_vesting::WeightInfo; const MAX_VESTING_SCHEDULES: u32 = 28; @@ -952,12 +952,20 @@ parameter_types! { impl pallet_treasury::Config for Runtime { type ApproveOrigin = EnsureRootOr; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = Burn; type BurnDestination = (); type Currency = Tokens; type MaxApprovals = MaxApprovals; type OnSlash = Treasury; type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = ConstU32<10>; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; @@ -967,14 +975,6 @@ impl pallet_treasury::Config for Runtime { type SpendOrigin = frame_support::traits::NeverEnsureOrigin; type SpendPeriod = SpendPeriod; type WeightInfo = weights::pallet_treasury::WeightInfo; - type AssetKind = (); - type Beneficiary = Self::AccountId; - type BeneficiaryLookup = IdentityLookup; - type Paymaster = PayFromAccount; - type BalanceConverter = UnityAssetBalanceConversion; - type PayoutPeriod = ConstU32<10>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); } parameter_types! { @@ -1408,6 +1408,7 @@ impl pallet_xcm_transactor::Config for Runtime { type CurrencyIdToLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRoot; type HrmpManipulatorOrigin = EnsureRootOr; + type HrmpOpenOrigin = EnsureRoot; type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; @@ -1417,7 +1418,6 @@ impl pallet_xcm_transactor::Config for Runtime { type UniversalLocation = UniversalLocation; type Weigher = XcmWeigher; type WeightInfo = (); - type HrmpOpenOrigin = EnsureRoot; type XcmSender = XcmRouter; } @@ -1880,11 +1880,11 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; type WithdrawOrigin = EnsureAddressTruncated; - type SuicideQuickClearLimit = ConstU32<0>; } impl pallet_evm_chain_id::Config for Runtime {} diff --git a/runtime/altair/src/xcm.rs b/runtime/altair/src/xcm.rs index bead33dd5e..9e1975d585 100644 --- a/runtime/altair/src/xcm.rs +++ b/runtime/altair/src/xcm.rs @@ -107,11 +107,11 @@ impl staging_xcm_executor::Config for XcmConfig { type SafeCallFilter = SafeCallFilter; type SubscriptionService = PolkadotXcm; type Trader = Trader; + type TransactionalProcessor = FrameTransactionalProcessor; type UniversalAliases = Nothing; type UniversalLocation = UniversalLocation; type Weigher = FixedWeightBounds; type XcmSender = XcmRouter; - type TransactionalProcessor = FrameTransactionalProcessor; } /// Trader - The means of purchasing weight credit for XCM execution. @@ -257,9 +257,9 @@ impl orml_xtokens::Config for Runtime { type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; + type LocationsFilter = Everything; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type LocationsFilter = Everything; type ReserveProvider = AbsoluteReserveProvider; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 998196f3e5..35f24ac9ad 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -49,8 +49,7 @@ use cfg_types::{ StakingCurrency, TrancheCurrency, }, }; -use cumulus_primitives_core::AggregateMessageOrigin; -use cumulus_primitives_core::ParaId; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, @@ -101,7 +100,6 @@ use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use polkadot_runtime_common::{ prod_or_fast, xcm_sender::NoPriceForMessageDelivery, BlockHashCount, SlowAdjustingFeeUpdate, }; -use runtime_common::transfer_filter::PreNativeTransfer; use runtime_common::{ account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, @@ -119,7 +117,7 @@ use runtime_common::{ origin::EnsureAccountOrRootOr, permissions::PoolAdminCheck, rewards::SingleCurrencyMovement, - transfer_filter::PreLpTransfer, + transfer_filter::{PreLpTransfer, PreNativeTransfer}, xcm::AccountIdToLocation, xcm_transactor, AllowanceDeposit, CurrencyED, }; @@ -247,11 +245,11 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type SS58Prefix = SS58Prefix; type SystemWeightInfo = weights::frame_system::WeightInfo; /// Get the chain's current version. type Version = Version; - type RuntimeTask = RuntimeTask; } /// Base Call Filter @@ -300,15 +298,16 @@ parameter_types! { impl cumulus_pallet_parachain_system::Config for Runtime { type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; + // Using weights for recomended hardware + type DmpQueue = frame_support::traits::EnqueueWithOrigin; type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; type RuntimeEvent = RuntimeEvent; - type XcmpMessageHandler = XcmpQueue; - type WeightInfo = (); // Using weights for recomended hardware - type DmpQueue = frame_support::traits::EnqueueWithOrigin; type SelfParaId = staging_parachain_info::Pallet; + type WeightInfo = (); + type XcmpMessageHandler = XcmpQueue; } impl staging_parachain_info::Config for Runtime {} @@ -318,8 +317,9 @@ parameter_types! { } impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); // Using weights for recomended hardware + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + // Using weights for recomended hardware #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; @@ -329,12 +329,12 @@ impl pallet_message_queue::Config for Runtime { staging_xcm_executor::XcmExecutor, RuntimeCall, >; - type Size = u32; type QueueChangeHandler = NarrowOriginToSibling; type QueuePausedQuery = NarrowOriginToSibling; - type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; - type MaxStale = sp_core::ConstU32<8>; + type RuntimeEvent = RuntimeEvent; type ServiceWeight = MessageQueueServiceWeight; + type Size = u32; + type WeightInfo = (); } /// XCMP Queue is responsible to handle XCM messages coming directly from @@ -342,13 +342,13 @@ impl pallet_message_queue::Config for Runtime { impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type ControllerOrigin = EnsureRoot; - type XcmpQueue = TransformOrigin; - type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type PriceForSiblingDelivery = NoPriceForMessageDelivery; type RuntimeEvent = RuntimeEvent; type VersionWrapper = PolkadotXcm; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type XcmpQueue = TransformOrigin; } parameter_types! { @@ -515,8 +515,8 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; - type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -1002,23 +1002,23 @@ parameter_types! { impl pallet_identity::Config for Runtime { type BasicDeposit = BasicDeposit; - type Currency = Balances; type ByteDeposit = ByteDeposit; + type Currency = Balances; type ForceOrigin = EnsureRootOr>; type IdentityInformation = pallet_identity::legacy::IdentityInfo; type MaxRegistrars = MaxRegistrars; type MaxSubAccounts = MaxSubAccounts; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type OffchainSignature = Signature; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type RegistrarOrigin = EnsureRootOr>; type RuntimeEvent = RuntimeEvent; + type SigningPublicKey = ::Signer; type Slashed = Treasury; type SubAccountDeposit = SubAccountDeposit; - type OffchainSignature = Signature; - type SigningPublicKey = ::Signer; type UsernameAuthorityOrigin = EnsureRoot; - type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; - type MaxSuffixLength = ConstU32<7>; - type MaxUsernameLength = ConstU32<32>; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -1029,12 +1029,12 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { + type BlockNumberProvider = System; type BlockNumberToBalance = ConvertInto; type Currency = Balances; type MinVestedTransfer = MinVestedTransfer; type RuntimeEvent = RuntimeEvent; type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; - type BlockNumberProvider = System; type WeightInfo = weights::pallet_vesting::WeightInfo; const MAX_VESTING_SCHEDULES: u32 = 3; @@ -1069,12 +1069,20 @@ parameter_types! { impl pallet_treasury::Config for Runtime { type ApproveOrigin = EnsureRootOr; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = Burn; type BurnDestination = (); type Currency = Tokens; type MaxApprovals = MaxApprovals; type OnSlash = Treasury; type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = ConstU32<10>; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; @@ -1084,14 +1092,6 @@ impl pallet_treasury::Config for Runtime { type SpendOrigin = frame_support::traits::NeverEnsureOrigin; type SpendPeriod = SpendPeriod; type WeightInfo = weights::pallet_treasury::WeightInfo; - type AssetKind = (); - type Beneficiary = Self::AccountId; - type BeneficiaryLookup = IdentityLookup; - type Paymaster = PayFromAccount; - type BalanceConverter = UnityAssetBalanceConversion; - type PayoutPeriod = ConstU32<10>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); } // our pallets @@ -1218,6 +1218,7 @@ impl pallet_xcm_transactor::Config for Runtime { type CurrencyIdToLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRootOr; type HrmpManipulatorOrigin = EnsureRootOr; + type HrmpOpenOrigin = EnsureRoot; type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; @@ -1227,7 +1228,6 @@ impl pallet_xcm_transactor::Config for Runtime { type UniversalLocation = UniversalLocation; type Weigher = XcmWeigher; type WeightInfo = (); - type HrmpOpenOrigin = EnsureRoot; type XcmSender = XcmRouter; } @@ -1995,11 +1995,11 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; type WithdrawOrigin = EnsureAddressTruncated; - type SuicideQuickClearLimit = ConstU32<0>; } impl pallet_evm_chain_id::Config for Runtime {} diff --git a/runtime/centrifuge/src/xcm.rs b/runtime/centrifuge/src/xcm.rs index f6a98228fb..0c93b154fd 100644 --- a/runtime/centrifuge/src/xcm.rs +++ b/runtime/centrifuge/src/xcm.rs @@ -108,11 +108,11 @@ impl staging_xcm_executor::Config for XcmConfig { type SafeCallFilter = SafeCallFilter; type SubscriptionService = PolkadotXcm; type Trader = Trader; + type TransactionalProcessor = FrameTransactionalProcessor; type UniversalAliases = Nothing; type UniversalLocation = UniversalLocation; type Weigher = FixedWeightBounds; type XcmSender = XcmRouter; - type TransactionalProcessor = FrameTransactionalProcessor; } /// Trader - The means of purchasing weight credit for XCM execution. @@ -278,9 +278,9 @@ impl orml_xtokens::Config for Runtime { type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; + type LocationsFilter = Everything; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type LocationsFilter = Everything; type ReserveProvider = AbsoluteReserveProvider; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs index a3baa3c99d..89af83d124 100644 --- a/runtime/common/src/fees.rs +++ b/runtime/common/src/fees.rs @@ -143,8 +143,10 @@ mod test { use cfg_types::ids::TREASURY_PALLET_ID; use frame_support::{ derive_impl, parameter_types, - traits::tokens::{PayFromAccount, UnityAssetBalanceConversion}, - traits::{Currency, FindAuthor}, + traits::{ + tokens::{PayFromAccount, UnityAssetBalanceConversion}, + Currency, FindAuthor, + }, PalletId, }; use sp_core::ConstU64; @@ -192,12 +194,20 @@ mod test { impl pallet_treasury::Config for Runtime { type ApproveOrigin = frame_system::EnsureRoot; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = (); type BurnDestination = (); type Currency = pallet_balances::Pallet; type MaxApprovals = MaxApprovals; type OnSlash = (); type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = ConstU64<10>; type ProposalBond = (); type ProposalBondMaximum = (); type ProposalBondMinimum = (); @@ -207,14 +217,6 @@ mod test { type SpendOrigin = frame_support::traits::NeverEnsureOrigin; type SpendPeriod = (); type WeightInfo = (); - type AssetKind = (); - type Beneficiary = Self::AccountId; - type BeneficiaryLookup = IdentityLookup; - type Paymaster = PayFromAccount; - type BalanceConverter = UnityAssetBalanceConversion; - type PayoutPeriod = ConstU64<10>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); } pub struct OneAuthor; diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 06b19e97db..a562b97bfe 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -50,8 +50,7 @@ use cfg_types::{ }, }; use chainbridge::constants::DEFAULT_RELAYER_VOTE_THRESHOLD; -use cumulus_primitives_core::AggregateMessageOrigin; -use cumulus_primitives_core::ParaId; +use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use fp_rpc::TransactionStatus; use frame_support::{ construct_runtime, @@ -98,8 +97,9 @@ use pallet_restricted_tokens::{ use pallet_transaction_payment::CurrencyAdapter; use pallet_transaction_payment_rpc_runtime_api::{FeeDetails, RuntimeDispatchInfo}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use polkadot_runtime_common::xcm_sender::NoPriceForMessageDelivery; -use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; +use polkadot_runtime_common::{ + xcm_sender::NoPriceForMessageDelivery, BlockHashCount, SlowAdjustingFeeUpdate, +}; use runtime_common::{ account_conversion::{AccountConverter, RuntimeAccountConverter}, asset_registry, @@ -116,12 +116,12 @@ use runtime_common::{ Feeder, OracleConverterBridge, OracleRatioProvider, OracleRatioProviderLocalAssetExtension, }, permissions::PoolAdminCheck, + remarks::Remark, rewards::SingleCurrencyMovement, - transfer_filter::PreLpTransfer, + transfer_filter::{PreLpTransfer, PreNativeTransfer}, xcm::AccountIdToLocation, xcm_transactor, AllowanceDeposit, CurrencyED, }; -use runtime_common::{remarks::Remark, transfer_filter::PreNativeTransfer}; use scale_info::TypeInfo; use sp_api::impl_runtime_apis; use sp_core::{OpaqueMetadata, H160, H256, U256}; @@ -247,11 +247,11 @@ impl frame_system::Config for Runtime { type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = RuntimeTask; type SS58Prefix = SS58Prefix; type SystemWeightInfo = weights::frame_system::WeightInfo; /// Get the chain's current version. type Version = Version; - type RuntimeTask = RuntimeTask; } /// Base Call Filter @@ -300,14 +300,15 @@ impl cumulus_pallet_parachain_system::Config for Runtime { // Using AnyRelayNumber only for the development & demo environments, // to be able to recover quickly from a relay chains issue type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::AnyRelayNumber; - type WeightInfo = (); // Using weights for recomended hardware + type DmpQueue = frame_support::traits::EnqueueWithOrigin; + // Using weights for recomended hardware type OnSystemEvent = (); type OutboundXcmpMessageSource = XcmpQueue; type ReservedDmpWeight = ReservedDmpWeight; type ReservedXcmpWeight = ReservedXcmpWeight; - type DmpQueue = frame_support::traits::EnqueueWithOrigin; type RuntimeEvent = RuntimeEvent; type SelfParaId = staging_parachain_info::Pallet; + type WeightInfo = (); type XcmpMessageHandler = XcmpQueue; } @@ -318,8 +319,9 @@ parameter_types! { } impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); // Using weights for recomended hardware + type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; + type MaxStale = sp_core::ConstU32<8>; + // Using weights for recomended hardware #[cfg(feature = "runtime-benchmarks")] type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor; @@ -329,12 +331,12 @@ impl pallet_message_queue::Config for Runtime { staging_xcm_executor::XcmExecutor, RuntimeCall, >; - type Size = u32; type QueueChangeHandler = NarrowOriginToSibling; type QueuePausedQuery = NarrowOriginToSibling; - type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; - type MaxStale = sp_core::ConstU32<8>; + type RuntimeEvent = RuntimeEvent; type ServiceWeight = MessageQueueServiceWeight; + type Size = u32; + type WeightInfo = (); } /// XCMP Queue is responsible to handle XCM messages coming directly from @@ -342,13 +344,13 @@ impl pallet_message_queue::Config for Runtime { impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type ControllerOrigin = EnsureRoot; - type XcmpQueue = TransformOrigin; - type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type MaxInboundSuspended = sp_core::ConstU32<1_000>; type PriceForSiblingDelivery = NoPriceForMessageDelivery; type RuntimeEvent = RuntimeEvent; type VersionWrapper = PolkadotXcm; type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; + type XcmpQueue = TransformOrigin; } parameter_types! { @@ -406,8 +408,8 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; /// The overarching event type. type RuntimeEvent = RuntimeEvent; - type RuntimeHoldReason = RuntimeHoldReason; type RuntimeFreezeReason = RuntimeFreezeReason; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -897,22 +899,22 @@ parameter_types! { impl pallet_identity::Config for Runtime { type BasicDeposit = BasicDeposit; - type Currency = Tokens; type ByteDeposit = ByteDeposit; + type Currency = Tokens; type ForceOrigin = EnsureRootOr; type IdentityInformation = pallet_identity::legacy::IdentityInfo; type MaxRegistrars = MaxRegistrars; type MaxSubAccounts = MaxSubAccounts; + type MaxSuffixLength = ConstU32<7>; + type MaxUsernameLength = ConstU32<32>; + type OffchainSignature = Signature; + type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type RegistrarOrigin = EnsureRootOr; type RuntimeEvent = RuntimeEvent; + type SigningPublicKey = ::Signer; type Slashed = (); type SubAccountDeposit = SubAccountDeposit; - type OffchainSignature = Signature; - type SigningPublicKey = ::Signer; type UsernameAuthorityOrigin = EnsureRoot; - type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; - type MaxSuffixLength = ConstU32<7>; - type MaxUsernameLength = ConstU32<32>; type WeightInfo = weights::pallet_identity::WeightInfo; } @@ -923,12 +925,12 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { + type BlockNumberProvider = System; type BlockNumberToBalance = ConvertInto; type Currency = Tokens; type MinVestedTransfer = MinVestedTransfer; type RuntimeEvent = RuntimeEvent; type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; - type BlockNumberProvider = System; type WeightInfo = weights::pallet_vesting::WeightInfo; const MAX_VESTING_SCHEDULES: u32 = 28; @@ -1002,12 +1004,20 @@ impl pallet_treasury::Config for Runtime { type ApproveOrigin = EnsureRootOr< pallet_collective::EnsureProportionAtLeast, >; + type AssetKind = (); + type BalanceConverter = UnityAssetBalanceConversion; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); + type Beneficiary = Self::AccountId; + type BeneficiaryLookup = IdentityLookup; type Burn = Burn; type BurnDestination = (); type Currency = Tokens; type MaxApprovals = MaxApprovals; type OnSlash = Treasury; type PalletId = TreasuryPalletId; + type Paymaster = PayFromAccount; + type PayoutPeriod = ConstU32<10>; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; @@ -1017,14 +1027,6 @@ impl pallet_treasury::Config for Runtime { type SpendOrigin = frame_support::traits::NeverEnsureOrigin; type SpendPeriod = SpendPeriod; type WeightInfo = weights::pallet_treasury::WeightInfo; - type AssetKind = (); - type Beneficiary = Self::AccountId; - type BeneficiaryLookup = IdentityLookup; - type Paymaster = PayFromAccount; - type BalanceConverter = UnityAssetBalanceConversion; - type PayoutPeriod = ConstU32<10>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkHelper = (); } // our pallets @@ -1308,6 +1310,7 @@ impl pallet_xcm_transactor::Config for Runtime { type CurrencyIdToLocation = CurrencyIdConvert; type DerivativeAddressRegistrationOrigin = EnsureRoot; type HrmpManipulatorOrigin = EnsureRootOr; + type HrmpOpenOrigin = EnsureRoot; type MaxHrmpFee = staging_xcm_builder::Case; type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; type RuntimeEvent = RuntimeEvent; @@ -1317,7 +1320,6 @@ impl pallet_xcm_transactor::Config for Runtime { type UniversalLocation = UniversalLocation; type Weigher = XcmWeigher; type WeightInfo = (); - type HrmpOpenOrigin = EnsureRoot; type XcmSender = XcmRouter; } @@ -1969,11 +1971,11 @@ impl pallet_evm::Config for Runtime { type PrecompilesValue = PrecompilesValue; type Runner = pallet_evm::runner::stack::Runner; type RuntimeEvent = RuntimeEvent; + type SuicideQuickClearLimit = ConstU32<0>; type Timestamp = Timestamp; type WeightInfo = (); type WeightPerGas = WeightPerGas; type WithdrawOrigin = EnsureAddressTruncated; - type SuicideQuickClearLimit = ConstU32<0>; } impl pallet_evm_chain_id::Config for Runtime {} diff --git a/runtime/development/src/xcm.rs b/runtime/development/src/xcm.rs index f12dabcb57..4d2b1e3543 100644 --- a/runtime/development/src/xcm.rs +++ b/runtime/development/src/xcm.rs @@ -107,11 +107,11 @@ impl staging_xcm_executor::Config for XcmConfig { type SafeCallFilter = SafeCallFilter; type SubscriptionService = PolkadotXcm; type Trader = Trader; + type TransactionalProcessor = FrameTransactionalProcessor; type UniversalAliases = Nothing; type UniversalLocation = UniversalLocation; type Weigher = FixedWeightBounds; type XcmSender = XcmRouter; - type TransactionalProcessor = FrameTransactionalProcessor; } /// Trader - The means of purchasing weight credit for XCM execution. @@ -278,9 +278,9 @@ impl orml_xtokens::Config for Runtime { type BaseXcmWeight = BaseXcmWeight; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; + type LocationsFilter = Everything; type MaxAssetsForTransfer = MaxAssetsForTransfer; type MinXcmFee = ParachainMinFee; - type LocationsFilter = Everything; type ReserveProvider = AbsoluteReserveProvider; type RuntimeEvent = RuntimeEvent; type SelfLocation = SelfLocation; diff --git a/runtime/integration-tests/src/generic/cases/proxy.rs b/runtime/integration-tests/src/generic/cases/proxy.rs index 173b113017..fdd1781e28 100644 --- a/runtime/integration-tests/src/generic/cases/proxy.rs +++ b/runtime/integration-tests/src/generic/cases/proxy.rs @@ -21,7 +21,7 @@ use crate::{ self, currency::{cfg, register_currency, usd6, CurrencyInfo, Usd6}, genesis::{self, Genesis}, - xcm::setup_xcm, + xcm::setup_xcm, }, }, utils::accounts::Keyring, @@ -86,7 +86,7 @@ fn configure_proxy_and_x_transfer( dest: Box::new( Location::new( 1, - [ + [ Parachain(T::FudgeHandle::SIBLING_ID), Junction::AccountId32 { id: TO.into(), diff --git a/runtime/integration-tests/src/generic/config.rs b/runtime/integration-tests/src/generic/config.rs index 086ca1ac43..446cd973cc 100644 --- a/runtime/integration-tests/src/generic/config.rs +++ b/runtime/integration-tests/src/generic/config.rs @@ -123,8 +123,10 @@ pub trait Runtime: + pallet_proxy::Config + pallet_restricted_tokens::Config + pallet_restricted_xtokens::Config - + pallet_transfer_allowlist::Config - + pallet_liquidity_pools::Config< + + pallet_transfer_allowlist::Config< + CurrencyId = FilterCurrency, + Location = RestrictedTransferLocation, + > + pallet_liquidity_pools::Config< CurrencyId = CurrencyId, Balance = Balance, PoolId = PoolId, diff --git a/runtime/integration-tests/src/generic/impls.rs b/runtime/integration-tests/src/generic/impls.rs index 60e15f1827..6c90498716 100644 --- a/runtime/integration-tests/src/generic/impls.rs +++ b/runtime/integration-tests/src/generic/impls.rs @@ -181,7 +181,7 @@ impl_fudge_support!( FudgeDevelopment, polkadot_test_runtime, default_relay_session_keys(), - development_runtime, + development_runtime, 2000, 2001 ); @@ -190,7 +190,7 @@ impl_fudge_support!( FudgeAltair, polkadot_test_runtime, default_relay_session_keys(), - altair_runtime, + altair_runtime, 2088, 2089 ); @@ -199,7 +199,7 @@ impl_fudge_support!( FudgeCentrifuge, polkadot_test_runtime, default_relay_session_keys(), - centrifuge_runtime, + centrifuge_runtime, 2031, 2032 );