Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1a5d2cf
stopped using TakeFirstAssetTrader in AH Rococo & Westend, parametris…
x3c41a Apr 29, 2025
5b13008
fmt
x3c41a Apr 29, 2025
110062f
prdoct
x3c41a Apr 29, 2025
0df29cc
Merge branch 'master' into rm_tak_first_asset_trader
x3c41a Apr 29, 2025
9bac89f
Merge branch 'master' into rm_tak_first_asset_trader
x3c41a Apr 30, 2025
a6c56eb
newline in prdoc
x3c41a Apr 30, 2025
4878293
Introduced a way to add configurable amount of both asset to the liqu…
x3c41a May 1, 2025
110e6c5
Merge branch 'master' into rm_tak_first_asset_trader
x3c41a May 1, 2025
9a37952
removed unused import
x3c41a May 1, 2025
7b58abd
Merge branch 'master' into rm_tak_first_asset_trader
x3c41a May 1, 2025
98538a3
Changed to Westend fix only
x3c41a May 1, 2025
5cae428
Merge branch 'master' into rm_tak_first_asset_trader
x3c41a May 1, 2025
a21c540
removed the tests that were verifying first_asset_trader functionalit…
x3c41a May 1, 2025
50f090a
removed unused imports
x3c41a May 1, 2025
3ead716
fixed other emulated failing tests
x3c41a May 1, 2025
5580912
fixed other snowbridge tests
x3c41a May 1, 2025
908f771
improved snowbridge macro and fixed the tests
x3c41a May 2, 2025
c75d8f8
prdoc
x3c41a May 2, 2025
f5505f2
Merge branch 'master' into rm_tak_first_asset_trader
x3c41a May 2, 2025
d3b842a
prdoc fix
x3c41a May 2, 2025
85e4c99
fmt
x3c41a May 2, 2025
f56b178
snowbridge fmt
x3c41a May 2, 2025
14d3d48
removed unused helper types
x3c41a May 2, 2025
023861d
removed unused import
x3c41a May 2, 2025
7afb1d4
Merge branch 'master' into rm_tak_first_asset_trader
x3c41a May 2, 2025
ec6fabc
removed rococo config
x3c41a May 2, 2025
d37dc44
removed take_first_trader_tests
x3c41a May 2, 2025
14651af
fixed or remove some asset-hub-rococo-runtime tests
x3c41a May 2, 2025
cb07b26
commented out failing AH westend & rococo tests. I'll investigate the…
x3c41a May 2, 2025
1f1cb9a
improved commenting out
x3c41a May 2, 2025
bc6b98a
removed unused rococo imports
x3c41a May 2, 2025
159d8ed
Merge branch 'master' into rm_tak_first_asset_trader
x3c41a May 2, 2025
7a78c22
fmt
x3c41a May 2, 2025
e30f79c
removed unused imports from ahw-emulated-chain
x3c41a May 2, 2025
d2c84a8
removed unused imports from ahw-emulated-chain[2]
x3c41a May 2, 2025
c178347
fmt
x3c41a May 2, 2025
05cf055
fixed AHW send_xcm_from_para_to_asset_hub_paying_fee_with_sufficient_…
x3c41a May 2, 2025
23d2322
removed unused import
x3c41a May 2, 2025
f0edff0
fmt
x3c41a May 2, 2025
66ea765
fixed AHR send_xcm_from_para_to_asset_hub_paying_fee_with_sufficient_…
x3c41a May 2, 2025
6e4178a
fixed prdoc
x3c41a May 2, 2025
6d13087
Update prdoc/pr_8376.prdoc
x3c41a May 2, 2025
39b93c8
Update prdoc/pr_8376.prdoc
acatangiu May 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ macro_rules! foreign_balance_on {
}

#[macro_export]
macro_rules! create_pool_with_wnd_on {
( $chain:ident, $asset_id:expr, $is_foreign:expr, $asset_owner:expr ) => {
macro_rules! create_pool_with_wnd_on_custom_amounts {
( $chain:ident, $asset_id:expr, $is_foreign:expr, $asset_owner:expr, $wnd_amount:expr, $asset_amount:expr ) => {
emulated_integration_tests_common::impls::paste::paste! {
<$chain>::execute_with(|| {
type RuntimeEvent = <$chain as Chain>::RuntimeEvent;
Expand Down Expand Up @@ -87,8 +87,8 @@ macro_rules! create_pool_with_wnd_on {
signed_owner,
Box::new(wnd_location),
Box::new($asset_id),
1_000_000_000_000,
2_000_000_000_000, // $asset_id is worth half of wnd
$wnd_amount,
$asset_amount,
0,
0,
owner.into()
Expand All @@ -104,3 +104,17 @@ macro_rules! create_pool_with_wnd_on {
}
};
}

#[macro_export]
macro_rules! create_pool_with_wnd_on {
( $chain:ident, $asset_id:expr, $is_foreign:expr, $asset_owner:expr ) => {
$crate::create_pool_with_wnd_on_custom_amounts!(
$chain,
$asset_id,
$is_foreign,
$asset_owner,
1_000_000_000_000,
2_000_000_000_000
);
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::{create_pool_with_wnd_on, foreign_balance_on, imports::*};
use crate::{
create_pool_with_wnd_on, create_pool_with_wnd_on_custom_amounts, foreign_balance_on, imports::*,
};
use frame_support::traits::tokens::fungibles::Mutate;
use xcm_builder::{DescribeAllTerminal, DescribeFamily, HashedDescription};
use xcm_executor::traits::ConvertLocation;
Expand Down Expand Up @@ -113,7 +115,14 @@ fn transact_from_para_to_para_through_asset_hub() {

// We create a pool between WND and USDT in AssetHub.
let usdt = Location::new(0, [PalletInstance(ASSETS_PALLET_ID), GeneralIndex(USDT_ID.into())]);
create_pool_with_wnd_on!(AssetHubWestend, usdt, false, AssetHubWestendSender::get());
create_pool_with_wnd_on_custom_amounts!(
AssetHubWestend,
usdt,
false,
AssetHubWestendSender::get(),
1_000_000_000_000,
20_000_000_000
);
// We also need a pool between WND and USDT on PenpalA.
create_pool_with_wnd_on!(PenpalA, PenpalUsdtFromAssetHub::get(), true, PenpalAssetOwner::get());
// We also need a pool between WND and USDT on PenpalB.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,32 +405,6 @@ impl xcm_executor::Config for XcmConfig {
ResolveAssetTo<StakingPot, crate::NativeAndNonPoolAssets>,
AccountId,
>,
// This trader allows to pay with `is_sufficient=true` "Trust Backed" assets from dedicated
// `pallet_assets` instance - `Assets`.
cumulus_primitives_utility::TakeFirstAssetTrader<
AccountId,
AssetFeeAsExistentialDepositMultiplierFeeCharger,
TrustBackedAssetsConvertedConcreteId,
Assets,
cumulus_primitives_utility::XcmFeesTo32ByteAccount<
FungiblesTransactor,
AccountId,
XcmAssetFeesReceiver,
>,
>,
// This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated
// `pallet_assets` instance - `ForeignAssets`.
cumulus_primitives_utility::TakeFirstAssetTrader<
AccountId,
ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger,
ForeignAssetsConvertedConcreteId,
ForeignAssets,
cumulus_primitives_utility::XcmFeesTo32ByteAccount<
ForeignFungiblesTransactor,
AccountId,
XcmAssetFeesReceiver,
>,
>,
);
type ResponseHandler = PolkadotXcm;
type AssetTrap = PolkadotXcm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,32 +426,6 @@ impl xcm_executor::Config for XcmConfig {
ResolveAssetTo<StakingPot, crate::NativeAndNonPoolAssets>,
AccountId,
>,
// This trader allows to pay with `is_sufficient=true` "Trust Backed" assets from dedicated
// `pallet_assets` instance - `Assets`.
cumulus_primitives_utility::TakeFirstAssetTrader<
AccountId,
AssetFeeAsExistentialDepositMultiplierFeeCharger,
TrustBackedAssetsConvertedConcreteId,
Assets,
cumulus_primitives_utility::XcmFeesTo32ByteAccount<
FungiblesTransactor,
AccountId,
XcmAssetFeesReceiver,
>,
>,
// This trader allows to pay with `is_sufficient=true` "Foreign" assets from dedicated
// `pallet_assets` instance - `ForeignAssets`.
cumulus_primitives_utility::TakeFirstAssetTrader<
AccountId,
ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger,
ForeignAssetsConvertedConcreteId,
ForeignAssets,
cumulus_primitives_utility::XcmFeesTo32ByteAccount<
ForeignFungiblesTransactor,
AccountId,
XcmAssetFeesReceiver,
>,
>,
);
type ResponseHandler = PolkadotXcm;
type AssetTrap = PolkadotXcm;
Expand Down
12 changes: 12 additions & 0 deletions prdoc/pr_8376.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
title: 'Stopped using TakeFirstAssetTrader in AH Rococo & Westend'
doc:
- audience: Runtime Dev
description: |-
Removed `TakeFirstAssetTrader` from configs. Improved macro, fixed test.
crates:
- name: asset-hub-rococo-runtime
bump: minor
- name: asset-hub-westend-runtime
bump: minor
- name: asset-hub-westend-integration-tests
bump: minor
Loading