-
Notifications
You must be signed in to change notification settings - Fork 1.1k
pallet-xcm: add new extrinsic for asset transfers using explicit XCM transfer types #3695
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
Changes from 30 commits
dda9308
1db1cae
f5e1dfb
547eeee
c7ee1af
ed77fde
a7a44c9
ffa6250
4afba95
210cdd2
c918bea
3db344b
10d2c40
5b48155
dbe453d
42e4041
e794df3
81dc911
e1dbf7a
ef83eab
a2b8708
4250692
888d403
1c86e6e
b82d0b9
f4e88da
4f2381c
36af01f
bd9233a
9c7bd39
adf5128
1347f0b
e3acff2
4a44194
0d407eb
22093d0
a673792
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,15 +80,14 @@ pub fn genesis(para_id: u32) -> Storage { | |
| assets: vec![ | ||
| // Relay Native asset representation | ||
| ( | ||
| Location::try_from(RelayLocation::get()).expect("conversion works"), | ||
| Location::try_from(RelayLocation::get()).unwrap(), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we mange to merge this: #4037 before, most of this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. either way someone will be fixing conflicts so I don't see it as an advantage to do 4037 before 😆 |
||
| PenpalAssetOwner::get(), | ||
| true, | ||
| ED, | ||
| ), | ||
| // Sufficient AssetHub asset representation | ||
| ( | ||
| Location::try_from(LocalReservableFromAssetHub::get()) | ||
| .expect("conversion works"), | ||
| Location::try_from(LocalReservableFromAssetHub::get()).unwrap(), | ||
| PenpalAssetOwner::get(), | ||
| true, | ||
| ED, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,16 +16,19 @@ | |
| mod genesis; | ||
| pub use genesis::{genesis, PenpalAssetOwner, PenpalSudoAccount, ED, PARA_ID_A, PARA_ID_B}; | ||
| pub use penpal_runtime::xcm_config::{ | ||
| CustomizableAssetFromSystemAssetHub, LocalTeleportableToAssetHub, XcmConfig, | ||
| CustomizableAssetFromSystemAssetHub, RelayNetworkId as PenpalRelayNetworkId, | ||
| }; | ||
|
|
||
| // Substrate | ||
| use frame_support::traits::OnInitialize; | ||
| use sp_core::Encode; | ||
|
|
||
| // Cumulus | ||
| use emulated_integration_tests_common::{ | ||
| impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, | ||
| impl_assets_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, | ||
| impl_assets_helpers_for_parachain, impl_xcm_helpers_for_parachain, | ||
| impls::{NetworkId, Parachain}, | ||
| xcm_emulator::decl_test_parachains, | ||
| }; | ||
|
|
||
| // Penpal Parachain declaration | ||
|
|
@@ -34,6 +37,10 @@ decl_test_parachains! { | |
| genesis = genesis(PARA_ID_A), | ||
| on_init = { | ||
| penpal_runtime::AuraExt::on_initialize(1); | ||
| frame_support::assert_ok!(penpal_runtime::System::set_storage( | ||
| penpal_runtime::RuntimeOrigin::root(), | ||
| vec![(PenpalRelayNetworkId::key().to_vec(), NetworkId::Rococo.encode())], | ||
| )); | ||
|
Comment on lines
+40
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }, | ||
| runtime = penpal_runtime, | ||
| core = { | ||
|
|
@@ -53,6 +60,10 @@ decl_test_parachains! { | |
| genesis = genesis(PARA_ID_B), | ||
| on_init = { | ||
| penpal_runtime::AuraExt::on_initialize(1); | ||
| frame_support::assert_ok!(penpal_runtime::System::set_storage( | ||
| penpal_runtime::RuntimeOrigin::root(), | ||
| vec![(PenpalRelayNetworkId::key().to_vec(), NetworkId::Westend.encode())], | ||
| )); | ||
| }, | ||
| runtime = penpal_runtime, | ||
| core = { | ||
|
|
@@ -77,3 +88,5 @@ impl_assert_events_helpers_for_parachain!(PenpalA); | |
| impl_assert_events_helpers_for_parachain!(PenpalB); | ||
| impl_assets_helpers_for_parachain!(PenpalA); | ||
| impl_assets_helpers_for_parachain!(PenpalB); | ||
| impl_xcm_helpers_for_parachain!(PenpalA); | ||
| impl_xcm_helpers_for_parachain!(PenpalB); | ||
Uh oh!
There was an error while loading. Please reload this page.