From 8d0b2f0c49d513472a86ac62d04d9a4491e7bda8 Mon Sep 17 00:00:00 2001 From: muharem Date: Mon, 19 Feb 2024 22:02:59 +0800 Subject: [PATCH 1/6] treasury account on system chains --- .../asset-hub-kusama/src/xcm_config.rs | 12 +++++++++-- .../asset-hub-kusama/tests/tests.rs | 16 +++++++++++---- .../asset-hub-polkadot/src/xcm_config.rs | 12 +++++++++-- .../asset-hub-polkadot/tests/tests.rs | 16 +++++++++++---- .../bridge-hub-kusama/src/xcm_config.rs | 20 +++++++++++++++++-- .../bridge-hub-kusama/tests/tests.rs | 14 ++++++++++++- .../bridge-hub-polkadot/src/xcm_config.rs | 12 +++++++++-- .../bridge-hub-polkadot/tests/tests.rs | 14 ++++++++++++- .../collectives-polkadot/src/xcm_config.rs | 20 +++++++++++++++++-- 9 files changed, 116 insertions(+), 20 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index dd6535b648..b5b5c07c2c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -54,7 +54,10 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; -use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; +use xcm_executor::{ + traits::{ConvertLocation, WithOriginFilter}, + XcmExecutor, +}; #[cfg(feature = "runtime-benchmarks")] use {cumulus_primitives_core::ParaId, sp_core::Get}; @@ -77,6 +80,11 @@ parameter_types! { pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); + // Test [`crate::tests::treasury_pallet_account_not_none`] ensures that the result of location + // conversion is not `None`. + pub RelayTreasuryPalletAccount: AccountId = + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) + .unwrap_or(TreasuryAccount::get()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -598,7 +606,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + XcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = bridging::to_polkadot::UniversalAliases; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 603e3ea8ca..b409490c99 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -21,8 +21,8 @@ use asset_hub_kusama_runtime::{ xcm_config::{ bridging::{self, XcmBridgeHubRouterFeeAssetId}, AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, - ForeignCreatorsSovereignAccountOf, KsmLocation, LocationToAccountId, TreasuryAccount, - TrustBackedAssetsPalletLocation, XcmConfig, + ForeignCreatorsSovereignAccountOf, KsmLocation, LocationToAccountId, RelayTreasuryLocation, + RelayTreasuryPalletAccount, TrustBackedAssetsPalletLocation, XcmConfig, }, AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime, @@ -43,7 +43,7 @@ use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance} use sp_runtime::traits::MaybeEquivalence; use system_parachains_constants::kusama::fee::WeightToFee; use xcm::latest::prelude::*; -use xcm_executor::traits::{Identity, JustTry, WeightTrader}; +use xcm_executor::traits::{ConvertLocation, Identity, JustTry, WeightTrader}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; @@ -693,7 +693,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_polkadot_works( bridging_to_asset_hub_polkadot, WeightLimit::Unlimited, Some(XcmBridgeHubRouterFeeAssetId::get()), - Some(TreasuryAccount::get()), + Some(RelayTreasuryPalletAccount::get()), ) } @@ -802,3 +802,11 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { }, ) } + +#[test] +fn treasury_pallet_account_not_non() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index 04469b3fcd..a4a80b010c 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -51,7 +51,10 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; -use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; +use xcm_executor::{ + traits::{ConvertLocation, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); @@ -67,6 +70,11 @@ parameter_types! { pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); + // Test [`crate::tests::treasury_pallet_account_not_none`] ensures that the result of location + // conversion is not `None`. + pub RelayTreasuryPalletAccount: AccountId = + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) + .unwrap_or(TreasuryAccount::get()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -520,7 +528,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + XcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = bridging::to_kusama::UniversalAliases; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index b9bb25e243..0a2f6cb9d9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -21,8 +21,8 @@ use asset_hub_polkadot_runtime::{ xcm_config::{ bridging::{self, XcmBridgeHubRouterFeeAssetId}, AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, DotLocation, - ForeignCreatorsSovereignAccountOf, LocationToAccountId, TreasuryAccount, - TrustBackedAssetsPalletLocation, XcmConfig, + ForeignCreatorsSovereignAccountOf, LocationToAccountId, RelayTreasuryLocation, + RelayTreasuryPalletAccount, TrustBackedAssetsPalletLocation, XcmConfig, }, AllPalletsWithoutSystem, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime, @@ -45,7 +45,7 @@ use parachains_common::{ use sp_runtime::traits::MaybeEquivalence; use system_parachains_constants::polkadot::fee::WeightToFee; use xcm::latest::prelude::*; -use xcm_executor::traits::{Identity, JustTry, WeightTrader}; +use xcm_executor::traits::{ConvertLocation, Identity, JustTry, WeightTrader}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; @@ -719,7 +719,7 @@ fn limited_reserve_transfer_assets_for_native_asset_to_asset_hub_kusama_works() bridging_to_asset_hub_kusama, WeightLimit::Unlimited, Some(XcmBridgeHubRouterFeeAssetId::get()), - Some(TreasuryAccount::get()), + Some(RelayTreasuryPalletAccount::get()), ) } #[test] @@ -827,3 +827,11 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { }, ) } + +#[test] +fn treasury_pallet_account_not_non() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index b73e1c7494..1daa5ee66d 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -47,7 +47,10 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; -use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; +use xcm_executor::{ + traits::{ConvertLocation, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const KsmRelayLocation: MultiLocation = MultiLocation::parent(); @@ -61,6 +64,11 @@ parameter_types! { pub const FellowshipLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); + // Test [`crate::tests::treasury_pallet_account_not_none`] ensures that the result of location + // conversion is not `None`. + pub RelayTreasuryPalletAccount: AccountId = + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) + .unwrap_or(TreasuryAccount::get()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -277,7 +285,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + XcmFeeToAccount, >; type MessageExporter = ToBridgeHubPolkadotHaulBlobExporter; type UniversalAliases = Nothing; @@ -337,3 +345,11 @@ impl cumulus_pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } + +#[test] +fn treasury_pallet_account_not_non() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index b9a0d64516..1f08d52f4c 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -23,7 +23,10 @@ use bridge_hub_kusama_runtime::{ WithBridgeHubPolkadotMessageBridge, WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, }, - xcm_config::{KsmRelayLocation, RelayNetwork, XcmConfig}, + xcm_config::{ + KsmRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, + RelayTreasuryPalletAccount, XcmConfig, + }, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, @@ -38,6 +41,7 @@ use sp_runtime::{ AccountId32, }; use xcm::latest::prelude::*; +use xcm_executor::traits::ConvertLocation; const ALICE: [u8; 32] = [1u8; 32]; @@ -312,3 +316,11 @@ pub fn can_calculate_fee_for_complex_message_delivery_transaction() {} #[test] pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {} + +#[test] +fn treasury_pallet_account_not_non() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 9eda62b0bc..5875453105 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -47,7 +47,10 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; -use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; +use xcm_executor::{ + traits::{ConvertLocation, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const DotRelayLocation: MultiLocation = MultiLocation::parent(); @@ -61,6 +64,11 @@ parameter_types! { pub const GovernanceLocation: MultiLocation = MultiLocation::parent(); pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); + // Test [`crate::tests::treasury_pallet_account_not_none`] ensures that the result of location + // conversion is not `None`. + pub RelayTreasuryPalletAccount: AccountId = + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) + .unwrap_or(TreasuryAccount::get()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -284,7 +292,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + XcmFeeToAccount, >; type MessageExporter = ToBridgeHubKusamaHaulBlobExporter; type UniversalAliases = Nothing; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index ba7a5c2d87..f35a8b63fc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -23,7 +23,10 @@ use bridge_hub_polkadot_runtime::{ WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, }, - xcm_config::{DotRelayLocation, RelayNetwork, XcmConfig}, + xcm_config::{ + DotRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, + RelayTreasuryPalletAccount, XcmConfig, + }, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, @@ -38,6 +41,7 @@ use sp_runtime::{ AccountId32, }; use xcm::latest::prelude::*; +use xcm_executor::traits::ConvertLocation; const ALICE: [u8; 32] = [1u8; 32]; @@ -312,3 +316,11 @@ pub fn can_calculate_fee_for_complex_message_delivery_transaction() {} #[test] pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {} + +#[test] +fn treasury_pallet_account_not_non() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 9112f1265a..9c3d54ef27 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -45,7 +45,10 @@ use xcm_builder::{ TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; -use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; +use xcm_executor::{ + traits::{ConvertLocation, WithOriginFilter}, + XcmExecutor, +}; parameter_types! { pub const RootLocation: MultiLocation = MultiLocation::here(); @@ -59,6 +62,11 @@ parameter_types! { pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(polkadot_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); pub const TreasurerBodyId: BodyId = BodyId::Index(xcm_constants::body::TREASURER_INDEX); + // Test [`treasury_pallet_account_not_none`] ensures that the result of location conversion is + // not `None`. + pub RelayTreasuryPalletAccount: AccountId = + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()) + .unwrap_or(TreasuryAccount::get()); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -304,7 +312,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + XcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = Nothing; @@ -363,3 +371,11 @@ impl cumulus_pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } + +#[test] +fn treasury_pallet_account_not_non() { + assert_eq!( + RelayTreasuryPalletAccount::get(), + LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() + ) +} From a41212f3e5e09272412f1376515abe0a8ea3ec5a Mon Sep 17 00:00:00 2001 From: Muharem Date: Wed, 21 Feb 2024 12:30:21 +0800 Subject: [PATCH 2/6] Update system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs Co-authored-by: Sergej Sakac <73715684+Szegoo@users.noreply.github.com> --- system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index b409490c99..17e521660c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -804,7 +804,7 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { } #[test] -fn treasury_pallet_account_not_non() { +fn treasury_pallet_account_not_none() { assert_eq!( RelayTreasuryPalletAccount::get(), LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() From caa1ca16dbe5a1acdd8b59a98108a48022ff373c Mon Sep 17 00:00:00 2001 From: muharem Date: Wed, 21 Feb 2024 12:33:15 +0800 Subject: [PATCH 3/6] fix typo --- system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs | 2 +- .../bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 2 +- system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs | 2 +- .../bridge-hubs/bridge-hub-polkadot/tests/tests.rs | 2 +- .../collectives/collectives-polkadot/src/xcm_config.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 0a2f6cb9d9..9bbc9ff3b2 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -829,7 +829,7 @@ fn change_xcm_bridge_hub_router_byte_fee_by_governance_works() { } #[test] -fn treasury_pallet_account_not_non() { +fn treasury_pallet_account_not_none() { assert_eq!( RelayTreasuryPalletAccount::get(), LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 1daa5ee66d..80f78555f8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -347,7 +347,7 @@ impl cumulus_pallet_xcm::Config for Runtime { } #[test] -fn treasury_pallet_account_not_non() { +fn treasury_pallet_account_not_none() { assert_eq!( RelayTreasuryPalletAccount::get(), LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 1f08d52f4c..f01e585359 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -318,7 +318,7 @@ pub fn can_calculate_fee_for_complex_message_delivery_transaction() {} pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {} #[test] -fn treasury_pallet_account_not_non() { +fn treasury_pallet_account_not_none() { assert_eq!( RelayTreasuryPalletAccount::get(), LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index f35a8b63fc..0af678360b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -318,7 +318,7 @@ pub fn can_calculate_fee_for_complex_message_delivery_transaction() {} pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {} #[test] -fn treasury_pallet_account_not_non() { +fn treasury_pallet_account_not_none() { assert_eq!( RelayTreasuryPalletAccount::get(), LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 9c3d54ef27..b6b523c2b8 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -373,7 +373,7 @@ impl cumulus_pallet_xcm::Config for Runtime { } #[test] -fn treasury_pallet_account_not_non() { +fn treasury_pallet_account_not_none() { assert_eq!( RelayTreasuryPalletAccount::get(), LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() From 1c7a1bb4ed57ad822fe3f918a4657c667b444fe5 Mon Sep 17 00:00:00 2001 From: muharem Date: Wed, 21 Feb 2024 16:39:08 +0800 Subject: [PATCH 4/6] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f26efe9c56..420bcd561b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - MMR leaves generated by `pallet_mmr` point to the next-authority-set of the current block instead of the prior block [polkadot-fellows/runtimes#169](https://github.com/polkadot-fellows/runtimes/pull/169) - Upgrade dependencies to the `polkadot-sdk@1.5.0` release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137)) - Deprecate the `xcm::body::TREASURER_INDEX` constant and use the standard `Treasury` variant from the `xcm::BodyId` type instead ([polkadot-fellows/runtimes#149](https://github.com/polkadot-fellows/runtimes/pull/149)) +- Use Relay Chain's Treasury Pallet account as a destination for XCM fees on System Parachain ([polkadot-fellows/runtimes#191](https://github.com/polkadot-fellows/runtimes/pull/191)) ### Removed From 149a112379aae0e6f46311c8d72319a52a217aad Mon Sep 17 00:00:00 2001 From: muharem Date: Tue, 5 Mar 2024 17:16:54 +0100 Subject: [PATCH 5/6] rust fmt --- system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs | 2 +- system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 89c63bb9f4..3c8c204a0a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -48,7 +48,7 @@ use system_parachains_constants::kusama::{ }; use xcm::latest::prelude::{Assets as XcmAssets, *}; use xcm_builder::V4V3LocationConverter; -use xcm_executor::traits::{ConvertLocation, Identity, JustTry, WeightTrader}; +use xcm_executor::traits::{ConvertLocation, JustTry, WeightTrader}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 324b04d20f..08949a1157 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -50,7 +50,7 @@ use system_parachains_constants::{ }; use xcm::latest::prelude::{Assets as XcmAssets, *}; use xcm_builder::V4V3LocationConverter; -use xcm_executor::traits::{ConvertLocation, Identity, JustTry, WeightTrader}; +use xcm_executor::traits::{ConvertLocation, JustTry, WeightTrader}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; From 1e07ecbc807329ea177cc100b47a4ca8356fdc7a Mon Sep 17 00:00:00 2001 From: muharem Date: Wed, 6 Mar 2024 12:38:38 +0100 Subject: [PATCH 6/6] empty commit