diff --git a/runtime/moonbase/src/xcm_config.rs b/runtime/moonbase/src/xcm_config.rs index d556e4a8e1..a2f25db09c 100644 --- a/runtime/moonbase/src/xcm_config.rs +++ b/runtime/moonbase/src/xcm_config.rs @@ -45,7 +45,7 @@ use xcm_builder::{ EnsureXcmOrigin, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, HashedDescription, NoChecking, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, - TakeWeightCredit, WeightInfoBounds, WithComputedOrigin, + TakeWeightCredit, TrailingSetTopicAsId, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; @@ -207,7 +207,7 @@ pub type XcmWeigher = WeightInfoBounds< MaxInstructions, >; -pub type XcmBarrier = ( +pub type XcmBarrier = TrailingSetTopicAsId<( // Weight that is paid for may be consumed. TakeWeightCredit, // Expected responses are OK. @@ -222,7 +222,7 @@ pub type XcmBarrier = ( UniversalLocation, ConstU32<8>, >, -); +)>; parameter_types! { /// Xcm fees will go to the treasury account @@ -317,12 +317,12 @@ pub type LocalOriginToLocation = SignedToAccountId20, // ..and XCMP to communicate with the sibling chains. XcmpQueue, -); +)>; type XcmExecutor = pallet_erc20_xcm_bridge::XcmExecutorWrapper< XcmExecutorConfig, diff --git a/runtime/moonbase/tests/integration_test.rs b/runtime/moonbase/tests/integration_test.rs index 9cc5ef1a25..5bf1b851cb 100644 --- a/runtime/moonbase/tests/integration_test.rs +++ b/runtime/moonbase/tests/integration_test.rs @@ -1526,7 +1526,7 @@ fn xtokens_precompiles_transfer() { (AccountId::from(ALICE), 2_000 * UNIT), (AccountId::from(BOB), 1_000 * UNIT), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { let xtokens_precompile_address = H160::from_low_u64_be(2052); @@ -1624,7 +1624,7 @@ fn xtokens_precompiles_transfer_multiasset() { (AccountId::from(ALICE), 2_000 * UNIT), (AccountId::from(BOB), 1_000 * UNIT), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { let xtokens_precompile_address = H160::from_low_u64_be(2052); @@ -1710,7 +1710,7 @@ fn xtokens_precompiles_transfer_native() { (AccountId::from(ALICE), 2_000 * UNIT), (AccountId::from(BOB), 1_000 * UNIT), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { let xtokens_precompile_address = H160::from_low_u64_be(2052); @@ -2255,7 +2255,7 @@ fn transact_through_signed_precompile_works_v1() { (AccountId::from(ALICE), 2_000 * UNIT), (AccountId::from(BOB), 1_000 * UNIT), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { // Destination @@ -2307,7 +2307,7 @@ fn transact_through_signed_precompile_works_v2() { (AccountId::from(ALICE), 2_000 * UNIT), (AccountId::from(BOB), 1_000 * UNIT), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { // Destination @@ -2347,7 +2347,7 @@ fn transact_through_signed_cannot_send_to_local_chain() { (AccountId::from(ALICE), 2_000 * UNIT), (AccountId::from(BOB), 1_000 * UNIT), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { // Destination diff --git a/runtime/moonbeam/src/xcm_config.rs b/runtime/moonbeam/src/xcm_config.rs index f9a01b255e..506f91d5ff 100644 --- a/runtime/moonbeam/src/xcm_config.rs +++ b/runtime/moonbeam/src/xcm_config.rs @@ -45,7 +45,7 @@ use xcm_builder::{ EnsureXcmOrigin, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, HashedDescription, NoChecking, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, - TakeWeightCredit, WeightInfoBounds, WithComputedOrigin, + TakeWeightCredit, TrailingSetTopicAsId, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; @@ -197,7 +197,7 @@ pub type XcmWeigher = WeightInfoBounds< MaxInstructions, >; -pub type XcmBarrier = ( +pub type XcmBarrier = TrailingSetTopicAsId<( // Weight that is paid for may be consumed. TakeWeightCredit, // Expected responses are OK. @@ -212,7 +212,7 @@ pub type XcmBarrier = ( UniversalLocation, ConstU32<8>, >, -); +)>; parameter_types! { /// Xcm fees will go to the treasury account @@ -312,12 +312,12 @@ pub type LocalOriginToLocation = SignedToAccountId20, // ..and XCMP to communicate with the sibling chains. XcmpQueue, -); +)>; impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; diff --git a/runtime/moonbeam/tests/integration_test.rs b/runtime/moonbeam/tests/integration_test.rs index c56a3c2da1..7147220384 100644 --- a/runtime/moonbeam/tests/integration_test.rs +++ b/runtime/moonbeam/tests/integration_test.rs @@ -1660,7 +1660,7 @@ fn root_can_change_default_xcm_vers() { // Root sets the defaultXcm assert_ok!(PolkadotXcm::force_default_xcm_version( root_origin(), - Some(2) + Some(3) )); // Now transferring does not fail @@ -1935,7 +1935,7 @@ fn xtokens_precompile_transfer() { (AccountId::from(ALICE), 2_000 * GLMR), (AccountId::from(BOB), 1_000 * GLMR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { let xtokens_precompile_address = H160::from_low_u64_be(2052); @@ -1995,7 +1995,7 @@ fn xtokens_precompile_transfer_multiasset() { (AccountId::from(ALICE), 2_000 * GLMR), (AccountId::from(BOB), 1_000 * GLMR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { let xtokens_precompile_address = H160::from_low_u64_be(2052); @@ -2041,7 +2041,7 @@ fn make_sure_glmr_can_be_transferred_precompile() { NimbusId::from_slice(&ALICE_NIMBUS).unwrap(), AccountId::from(ALICE), )]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { assert_ok!(PolkadotXcm::transfer_assets( @@ -2080,7 +2080,7 @@ fn make_sure_glmr_can_be_transferred() { NimbusId::from_slice(&ALICE_NIMBUS).unwrap(), AccountId::from(ALICE), )]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { let dest = Location { @@ -2158,7 +2158,7 @@ fn transact_through_signed_precompile_works_v2() { (AccountId::from(ALICE), 2_000 * GLMR), (AccountId::from(BOB), 1_000 * GLMR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { // Destination @@ -2198,7 +2198,7 @@ fn transact_through_signed_cannot_send_to_local_chain() { (AccountId::from(ALICE), 2_000 * GLMR), (AccountId::from(BOB), 1_000 * GLMR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { // Destination @@ -2329,7 +2329,7 @@ fn call_xtokens_with_fee() { (AccountId::from(ALICE), 2_000 * GLMR), (AccountId::from(BOB), 1_000 * GLMR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .with_xcm_assets(vec![XcmAssetInitialization { asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata { diff --git a/runtime/moonriver/src/xcm_config.rs b/runtime/moonriver/src/xcm_config.rs index bdaa8da76b..1519d25203 100644 --- a/runtime/moonriver/src/xcm_config.rs +++ b/runtime/moonriver/src/xcm_config.rs @@ -45,7 +45,7 @@ use xcm_builder::{ EnsureXcmOrigin, FungibleAdapter as XcmCurrencyAdapter, FungiblesAdapter, HashedDescription, NoChecking, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountKey20AsNative, SovereignSignedViaLocation, - TakeWeightCredit, WeightInfoBounds, WithComputedOrigin, + TakeWeightCredit, TrailingSetTopicAsId, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling}; @@ -205,7 +205,7 @@ pub type XcmWeigher = WeightInfoBounds< MaxInstructions, >; -pub type XcmBarrier = ( +pub type XcmBarrier = TrailingSetTopicAsId<( // Weight that is paid for may be consumed. TakeWeightCredit, // Expected responses are OK. @@ -220,7 +220,7 @@ pub type XcmBarrier = ( UniversalLocation, ConstU32<8>, >, -); +)>; parameter_types! { /// Xcm fees will go to the treasury account @@ -320,12 +320,12 @@ pub type LocalOriginToLocation = SignedToAccountId20, // ..and XCMP to communicate with the sibling chains. XcmpQueue, -); +)>; impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; diff --git a/runtime/moonriver/tests/integration_test.rs b/runtime/moonriver/tests/integration_test.rs index 66787031e1..2e45b0976f 100644 --- a/runtime/moonriver/tests/integration_test.rs +++ b/runtime/moonriver/tests/integration_test.rs @@ -1645,7 +1645,7 @@ fn root_can_change_default_xcm_vers() { // Root sets the defaultXcm assert_ok!(PolkadotXcm::force_default_xcm_version( root_origin(), - Some(2) + Some(3) )); // Now transferring does not fail @@ -1910,7 +1910,7 @@ fn xtokens_precompiles_transfer() { (AccountId::from(ALICE), 2_000 * MOVR), (AccountId::from(BOB), 1_000 * MOVR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { let xtokens_precompile_address = H160::from_low_u64_be(2052); @@ -1970,7 +1970,7 @@ fn xtokens_precompiles_transfer_multiasset() { (AccountId::from(ALICE), 2_000 * MOVR), (AccountId::from(BOB), 1_000 * MOVR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { let xtokens_precompile_address = H160::from_low_u64_be(2052); @@ -2142,7 +2142,7 @@ fn transact_through_signed_precompile_works_v2() { (AccountId::from(ALICE), 2_000 * MOVR), (AccountId::from(BOB), 1_000 * MOVR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { // Destination @@ -2182,7 +2182,7 @@ fn transact_through_signed_cannot_send_to_local_chain() { (AccountId::from(ALICE), 2_000 * MOVR), (AccountId::from(BOB), 1_000 * MOVR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .build() .execute_with(|| { // Destination @@ -2225,7 +2225,7 @@ fn call_xtokens_with_fee() { (AccountId::from(ALICE), 2_000 * MOVR), (AccountId::from(BOB), 1_000 * MOVR), ]) - .with_safe_xcm_version(2) + .with_safe_xcm_version(3) .with_xcm_assets(vec![XcmAssetInitialization { asset_type: AssetType::Xcm(xcm::v3::Location::parent()), metadata: AssetRegistrarMetadata {