Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swaps for XCM delivery fees #5131

Merged
merged 24 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bb0e969
feat(xcm-builder): add an adapter for configuring AssetExchanger
franciscoaguirre Jul 24, 2024
5939ba2
feat: allow different assets for delivery fees
franciscoaguirre Jul 24, 2024
81cc5bf
doc: add prdoc
franciscoaguirre Jul 26, 2024
f7a11c3
chore(xcm-executor): refactor finding asset to pay delivery fees
franciscoaguirre Jul 26, 2024
6ba0a32
chore(xcm-executor): remove TODO
franciscoaguirre Jul 26, 2024
8c1119e
chore(asset-hub-westend-integration-tests): make asset USDT
franciscoaguirre Jul 26, 2024
00950b6
chore(asset-hub-integration-tests): assertions
franciscoaguirre Jul 29, 2024
618dfc8
fix: fmt
franciscoaguirre Jul 29, 2024
82aaade
feat(asset-hub-rococo-integration-tests): add same tests as westend
franciscoaguirre Jul 29, 2024
576744d
chore: address feedback
franciscoaguirre Jul 30, 2024
6cd4edb
Merge branch 'master' into swaps-for-delivery-fees
franciscoaguirre Aug 5, 2024
d293630
chore(xcm-builder): not use sp-std
franciscoaguirre Aug 5, 2024
72e96aa
chore: delete old file
franciscoaguirre Aug 5, 2024
b2ce064
doc(prdoc): add crates
franciscoaguirre Aug 5, 2024
d0d1737
fix(xcm-executor): adjust to new AssetExchange API
franciscoaguirre Aug 5, 2024
970375c
fix(xcm-builder): handle case where exchange is called right after quote
franciscoaguirre Aug 5, 2024
0375886
doc(prdoc): correct bumps
franciscoaguirre Aug 6, 2024
b29bc85
Merge branch 'master' into swaps-for-delivery-fees
franciscoaguirre Aug 6, 2024
ccd07ad
doc(xcm-executor): improve some comments
franciscoaguirre Aug 8, 2024
b2e6e53
Merge branch 'master' into swaps-for-delivery-fees
franciscoaguirre Aug 9, 2024
9b6790c
doc(xcm-executor): address feedback
franciscoaguirre Aug 12, 2024
5038fb6
Merge branch 'master' into swaps-for-delivery-fees
franciscoaguirre Aug 12, 2024
1b01e21
Merge branch 'master' into swaps-for-delivery-fees
franciscoaguirre Sep 2, 2024
4df3d43
fix: v3 -> v4
franciscoaguirre Sep 2, 2024
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
6 changes: 6 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ use sp_core::{sr25519, storage::Storage};
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, get_account_id_from_seed,
PenpalSiblingSovereignAccount, PenpalTeleportableAssetLocation, RESERVABLE_ASSET_ID,
SAFE_XCM_VERSION,
SAFE_XCM_VERSION, USDT_ID,
};
use parachains_common::{AccountId, Balance};

pub const PARA_ID: u32 = 1000;
pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
pub const USDT_ED: Balance = 70_000;

parameter_types! {
pub AssetHubWestendAssetOwner: AccountId = get_account_id_from_seed::<sr25519::Public>("Alice");
Expand Down Expand Up @@ -64,7 +65,10 @@ pub fn genesis() -> Storage {
..Default::default()
},
assets: asset_hub_westend_runtime::AssetsConfig {
assets: vec![(RESERVABLE_ASSET_ID, AssetHubWestendAssetOwner::get(), true, ED)],
assets: vec![
(RESERVABLE_ASSET_ID, AssetHubWestendAssetOwner::get(), true, ED),
(USDT_ID, AssetHubWestendAssetOwner::get(), true, USDT_ED),
],
..Default::default()
},
foreign_assets: asset_hub_westend_runtime::ForeignAssetsConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION,
};
use parachains_common::{AccountId, Balance};
use penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation};
use penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation, UsdtFromAssetHub};
// Penpal
pub const PARA_ID_A: u32 = 2000;
pub const PARA_ID_B: u32 = 2001;
pub const ED: Balance = penpal_runtime::EXISTENTIAL_DEPOSIT;
pub const USDT_ED: Balance = 70_000;

parameter_types! {
pub PenpalSudoAccount: AccountId = get_account_id_from_seed::<sr25519::Public>("Alice");
Expand Down Expand Up @@ -80,6 +81,8 @@ pub fn genesis(para_id: u32) -> Storage {
(RelayLocation::get(), PenpalAssetOwner::get(), true, ED),
// Sufficient AssetHub asset representation
(LocalReservableFromAssetHub::get(), PenpalAssetOwner::get(), true, ED),
// USDT from AssetHub
(UsdtFromAssetHub::get(), PenpalAssetOwner::get(), true, USDT_ED),
],
..Default::default()
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ decl_test_parachains! {
PolkadotXcm: penpal_runtime::PolkadotXcm,
Assets: penpal_runtime::Assets,
ForeignAssets: penpal_runtime::ForeignAssets,
AssetConversion: penpal_runtime::AssetConversion,
Balances: penpal_runtime::Balances,
}
},
Expand All @@ -76,6 +77,7 @@ decl_test_parachains! {
PolkadotXcm: penpal_runtime::PolkadotXcm,
Assets: penpal_runtime::Assets,
ForeignAssets: penpal_runtime::ForeignAssets,
AssetConversion: penpal_runtime::AssetConversion,
Balances: penpal_runtime::Balances,
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ mod imports {
CustomizableAssetFromSystemAssetHub as PenpalCustomizableAssetFromSystemAssetHub,
LocalReservableFromAssetHub as PenpalLocalReservableFromAssetHub,
LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub,
UsdtFromAssetHub as PenpalUsdtFromAssetHub,
},
PenpalAParaPallet as PenpalAPallet, PenpalAssetOwner,
PenpalBParaPallet as PenpalBPallet, ED as PENPAL_ED,
Expand Down
Loading
Loading