mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
[xcm-builder] Replaced deprecated CurrencyAdapter with FungibleAdapter (#3287)
I found out during the cleanup of this deprecation message in the `polkadot-fellows` repository that we deprecated `CurrencyAdapter` without making the recommended changes. ## TODO - [ ] fix `polkadot-fellows` bump to 1.6.0 https://github.com/polkadot-fellows/runtimes/pull/159 --------- Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
This commit is contained in:
@@ -188,6 +188,7 @@ pub fn send_transfer_token_message_success<Runtime, XcmConfig>(
|
|||||||
let channel_id: ChannelId = origin.into();
|
let channel_id: ChannelId = origin.into();
|
||||||
|
|
||||||
let nonce = snowbridge_pallet_outbound_queue::Nonce::<Runtime>::try_get(channel_id);
|
let nonce = snowbridge_pallet_outbound_queue::Nonce::<Runtime>::try_get(channel_id);
|
||||||
|
dbg!(&nonce);
|
||||||
assert_ok!(nonce);
|
assert_ok!(nonce);
|
||||||
assert_eq!(nonce.unwrap(), 1);
|
assert_eq!(nonce.unwrap(), 1);
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,9 @@ use sp_runtime::{
|
|||||||
BuildStorage,
|
BuildStorage,
|
||||||
};
|
};
|
||||||
use xcm::prelude::*;
|
use xcm::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
FixedWeightBounds, FrameTransactionalProcessor, IsConcrete, NativeAsset, ParentIsPreset,
|
FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, IsConcrete, NativeAsset,
|
||||||
|
ParentIsPreset,
|
||||||
};
|
};
|
||||||
use xcm_executor::traits::ConvertOrigin;
|
use xcm_executor::traits::ConvertOrigin;
|
||||||
|
|
||||||
@@ -133,8 +132,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Means for transacting assets on this chain.
|
/// Means for transacting assets on this chain.
|
||||||
#[allow(deprecated)]
|
pub type LocalAssetTransactor = FungibleAdapter<
|
||||||
pub type LocalAssetTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -12,15 +12,13 @@ use pallet_xcm::XcmPassthrough;
|
|||||||
use polkadot_parachain_primitives::primitives::Sibling;
|
use polkadot_parachain_primitives::primitives::Sibling;
|
||||||
use polkadot_runtime_common::impls::ToAuthor;
|
use polkadot_runtime_common::impls::ToAuthor;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
|
||||||
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds,
|
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds,
|
||||||
FrameTransactionalProcessor, IsConcrete, NativeAsset, ParentIsPreset, RelayChainAsNative,
|
FrameTransactionalProcessor, FungibleAdapter, IsConcrete, NativeAsset, ParentIsPreset,
|
||||||
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
|
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
||||||
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
||||||
UsingComponents, WithComputedOrigin, WithUniqueTopic,
|
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
|
||||||
};
|
};
|
||||||
use xcm_executor::XcmExecutor;
|
use xcm_executor::XcmExecutor;
|
||||||
|
|
||||||
@@ -44,8 +42,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting assets on this chain.
|
/// Means for transacting assets on this chain.
|
||||||
#[allow(deprecated)]
|
pub type LocalAssetTransactor = FungibleAdapter<
|
||||||
pub type LocalAssetTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ macro_rules! test_parachain_is_trusted_teleporter {
|
|||||||
$crate::macros::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
$crate::macros::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||||
) => {},
|
) => {},
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
$crate::macros::pallet_balances::Event::Withdraw { who: sender, amount }
|
$crate::macros::pallet_balances::Event::Burned { who: sender, amount }
|
||||||
) => {},
|
) => {},
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@@ -90,7 +90,7 @@ macro_rules! test_parachain_is_trusted_teleporter {
|
|||||||
$receiver_para,
|
$receiver_para,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
$crate::macros::pallet_balances::Event::Deposit { who: receiver, .. }
|
$crate::macros::pallet_balances::Event::Minted { who: receiver, .. }
|
||||||
) => {},
|
) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
$crate::macros::pallet_message_queue::Event::Processed { success: true, .. }
|
$crate::macros::pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
|
|||||||
+9
-9
@@ -66,7 +66,7 @@ fn para_receiver_assertions<Test>(_: Test) {
|
|||||||
assert_expected_events!(
|
assert_expected_events!(
|
||||||
PenpalA,
|
PenpalA,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
pallet_message_queue::Event::Processed { success: true, .. }
|
pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
) => {},
|
) => {},
|
||||||
@@ -82,7 +82,7 @@ fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
@@ -101,12 +101,12 @@ fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// Amount to reserve transfer is withdrawn from Parachain's Sovereign account
|
// Amount to reserve transfer is withdrawn from Parachain's Sovereign account
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_penpal_on_ahr.clone().into(),
|
who: *who == sov_penpal_on_ahr.clone().into(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
pallet_message_queue::Event::Processed { success: true, .. }
|
pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
) => {},
|
) => {},
|
||||||
@@ -143,7 +143,7 @@ fn system_para_to_para_assets_receiver_assertions<Test>(_: Test) {
|
|||||||
assert_expected_events!(
|
assert_expected_events!(
|
||||||
PenpalA,
|
PenpalA,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
|
||||||
RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {},
|
RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
pallet_message_queue::Event::Processed { success: true, .. }
|
pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
@@ -160,7 +160,7 @@ fn para_to_para_sender_assertions(t: ParaToParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
@@ -184,14 +184,14 @@ fn para_to_para_relay_hop_assertions(t: ParaToParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// Withdrawn from sender parachain SA
|
// Withdrawn from sender parachain SA
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_penpal_a_on_rococo,
|
who: *who == sov_penpal_a_on_rococo,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Deposited to receiver parachain SA
|
// Deposited to receiver parachain SA
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Deposit { who, .. }
|
pallet_balances::Event::Minted { who, .. }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_penpal_b_on_rococo,
|
who: *who == sov_penpal_b_on_rococo,
|
||||||
},
|
},
|
||||||
@@ -207,7 +207,7 @@ fn para_to_para_receiver_assertions(_: ParaToParaTest) {
|
|||||||
assert_expected_events!(
|
assert_expected_events!(
|
||||||
PenpalB,
|
PenpalB,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
pallet_message_queue::Event::Processed { success: true, .. }
|
pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
) => {},
|
) => {},
|
||||||
|
|||||||
+10
-10
@@ -28,12 +28,12 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) {
|
|||||||
Rococo,
|
Rococo,
|
||||||
vec![
|
vec![
|
||||||
// Amount to teleport is withdrawn from Sender
|
// Amount to teleport is withdrawn from Sender
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Amount to teleport is deposited in Relay's `CheckAccount`
|
// Amount to teleport is deposited in Relay's `CheckAccount`
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => {
|
||||||
who: *who == <Rococo as RococoPallet>::XcmPallet::check_account(),
|
who: *who == <Rococo as RococoPallet>::XcmPallet::check_account(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
@@ -54,12 +54,12 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) {
|
|||||||
Rococo,
|
Rococo,
|
||||||
vec![
|
vec![
|
||||||
// Amount is withdrawn from Relay Chain's `CheckAccount`
|
// Amount is withdrawn from Relay Chain's `CheckAccount`
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == <Rococo as RococoPallet>::XcmPallet::check_account(),
|
who: *who == <Rococo as RococoPallet>::XcmPallet::check_account(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Amount minus fees are deposited in Receiver's account
|
// Amount minus fees are deposited in Receiver's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -88,7 +88,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) {
|
|||||||
AssetHubRococo,
|
AssetHubRococo,
|
||||||
vec![
|
vec![
|
||||||
// Amount is withdrawn from Sender's account
|
// Amount is withdrawn from Sender's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
@@ -105,7 +105,7 @@ fn para_dest_assertions(t: RelayToSystemParaTest) {
|
|||||||
AssetHubRococo,
|
AssetHubRococo,
|
||||||
vec![
|
vec![
|
||||||
// Amount minus fees are deposited in Receiver's account
|
// Amount minus fees are deposited in Receiver's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -122,7 +122,7 @@ fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) {
|
|||||||
PenpalA,
|
PenpalA,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
@@ -149,12 +149,12 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// native asset reserve transfer for paying fees, withdrawn from Penpal's sov account
|
// native asset reserve transfer for paying fees, withdrawn from Penpal's sov account
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_penpal_on_ahr.clone().into(),
|
who: *who == sov_penpal_on_ahr.clone().into(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => {
|
RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => {
|
||||||
@@ -221,7 +221,7 @@ fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) {
|
|||||||
amount: *amount == expected_asset_amount,
|
amount: *amount == expected_asset_amount,
|
||||||
},
|
},
|
||||||
// native asset for fee is deposited to receiver
|
// native asset for fee is deposited to receiver
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
|
|||||||
+9
-9
@@ -70,7 +70,7 @@ fn para_receiver_assertions<Test>(_: Test) {
|
|||||||
assert_expected_events!(
|
assert_expected_events!(
|
||||||
PenpalB,
|
PenpalB,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
pallet_message_queue::Event::Processed { success: true, .. }
|
pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
) => {},
|
) => {},
|
||||||
@@ -88,7 +88,7 @@ fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
@@ -109,12 +109,12 @@ fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_penpal_on_ahw.clone().into(),
|
who: *who == sov_penpal_on_ahw.clone().into(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
pallet_message_queue::Event::Processed { success: true, .. }
|
pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
) => {},
|
) => {},
|
||||||
@@ -153,7 +153,7 @@ fn system_para_to_para_assets_receiver_assertions<Test>(_: Test) {
|
|||||||
assert_expected_events!(
|
assert_expected_events!(
|
||||||
PenpalB,
|
PenpalB,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
|
||||||
RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {},
|
RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
pallet_message_queue::Event::Processed { success: true, .. }
|
pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
@@ -170,7 +170,7 @@ fn para_to_para_sender_assertions(t: ParaToParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
// Amount to reserve transfer is transferred to Parachain's Sovereign account
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
@@ -194,14 +194,14 @@ fn para_to_para_relay_hop_assertions(t: ParaToParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// Withdrawn from sender parachain SA
|
// Withdrawn from sender parachain SA
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_penpal_b_on_westend,
|
who: *who == sov_penpal_b_on_westend,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Deposited to receiver parachain SA
|
// Deposited to receiver parachain SA
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Deposit { who, .. }
|
pallet_balances::Event::Minted { who, .. }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_penpal_a_on_westend,
|
who: *who == sov_penpal_a_on_westend,
|
||||||
},
|
},
|
||||||
@@ -217,7 +217,7 @@ fn para_to_para_receiver_assertions(_: ParaToParaTest) {
|
|||||||
assert_expected_events!(
|
assert_expected_events!(
|
||||||
PenpalA,
|
PenpalA,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { .. }) => {},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
pallet_message_queue::Event::Processed { success: true, .. }
|
pallet_message_queue::Event::Processed { success: true, .. }
|
||||||
) => {},
|
) => {},
|
||||||
|
|||||||
+10
-10
@@ -28,12 +28,12 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) {
|
|||||||
Westend,
|
Westend,
|
||||||
vec![
|
vec![
|
||||||
// Amount to teleport is withdrawn from Sender
|
// Amount to teleport is withdrawn from Sender
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Amount to teleport is deposited in Relay's `CheckAccount`
|
// Amount to teleport is deposited in Relay's `CheckAccount`
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => {
|
||||||
who: *who == <Westend as WestendPallet>::XcmPallet::check_account(),
|
who: *who == <Westend as WestendPallet>::XcmPallet::check_account(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
@@ -54,12 +54,12 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) {
|
|||||||
Westend,
|
Westend,
|
||||||
vec![
|
vec![
|
||||||
// Amount is withdrawn from Relay Chain's `CheckAccount`
|
// Amount is withdrawn from Relay Chain's `CheckAccount`
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == <Westend as WestendPallet>::XcmPallet::check_account(),
|
who: *who == <Westend as WestendPallet>::XcmPallet::check_account(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Amount minus fees are deposited in Receiver's account
|
// Amount minus fees are deposited in Receiver's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -88,7 +88,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) {
|
|||||||
AssetHubWestend,
|
AssetHubWestend,
|
||||||
vec![
|
vec![
|
||||||
// Amount is withdrawn from Sender's account
|
// Amount is withdrawn from Sender's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
@@ -105,7 +105,7 @@ fn para_dest_assertions(t: RelayToSystemParaTest) {
|
|||||||
AssetHubWestend,
|
AssetHubWestend,
|
||||||
vec![
|
vec![
|
||||||
// Amount minus fees are deposited in Receiver's account
|
// Amount minus fees are deposited in Receiver's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -122,7 +122,7 @@ fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) {
|
|||||||
PenpalB,
|
PenpalB,
|
||||||
vec![
|
vec![
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
@@ -149,12 +149,12 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) {
|
|||||||
vec![
|
vec![
|
||||||
// native asset reserve transfer for paying fees, withdrawn from Penpal's sov account
|
// native asset reserve transfer for paying fees, withdrawn from Penpal's sov account
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_penpal_on_ahr.clone().into(),
|
who: *who == sov_penpal_on_ahr.clone().into(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => {
|
RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => {
|
||||||
@@ -221,7 +221,7 @@ fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) {
|
|||||||
amount: *amount == expected_asset_amount,
|
amount: *amount == expected_asset_amount,
|
||||||
},
|
},
|
||||||
// native asset for fee is deposited to receiver
|
// native asset for fee is deposited to receiver
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
RuntimeEvent::MessageQueue(
|
RuntimeEvent::MessageQueue(
|
||||||
|
|||||||
+2
-2
@@ -184,13 +184,13 @@ fn send_wnds_from_asset_hub_rococo_to_asset_hub_westend() {
|
|||||||
vec![
|
vec![
|
||||||
// WND is withdrawn from AHR's SA on AHW
|
// WND is withdrawn from AHR's SA on AHW
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_ahr_on_ahw,
|
who: *who == sov_ahr_on_ahw,
|
||||||
amount: *amount == amount_to_send,
|
amount: *amount == amount_to_send,
|
||||||
},
|
},
|
||||||
// WNDs deposited to beneficiary
|
// WNDs deposited to beneficiary
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == AssetHubWestendReceiver::get(),
|
who: *who == AssetHubWestendReceiver::get(),
|
||||||
},
|
},
|
||||||
// message processed successfully
|
// message processed successfully
|
||||||
|
|||||||
+1
-1
@@ -68,7 +68,7 @@ pub(crate) fn assert_bridge_hub_rococo_message_accepted(expected_processed: bool
|
|||||||
BridgeHubRococo,
|
BridgeHubRococo,
|
||||||
vec![
|
vec![
|
||||||
// pay for bridge fees
|
// pay for bridge fees
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { .. }) => {},
|
||||||
// message exported
|
// message exported
|
||||||
RuntimeEvent::BridgeWestendMessages(
|
RuntimeEvent::BridgeWestendMessages(
|
||||||
pallet_bridge_messages::Event::MessageAccepted { .. }
|
pallet_bridge_messages::Event::MessageAccepted { .. }
|
||||||
|
|||||||
+2
-2
@@ -478,7 +478,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
|
|||||||
assert!(
|
assert!(
|
||||||
events.iter().any(|event| matches!(
|
events.iter().any(|event| matches!(
|
||||||
event,
|
event,
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit{ who, amount })
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount })
|
||||||
if *who == TREASURY_ACCOUNT.into() && *amount == 16903333
|
if *who == TREASURY_ACCOUNT.into() && *amount == 16903333
|
||||||
)),
|
)),
|
||||||
"Snowbridge sovereign takes local fee."
|
"Snowbridge sovereign takes local fee."
|
||||||
@@ -487,7 +487,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
|
|||||||
assert!(
|
assert!(
|
||||||
events.iter().any(|event| matches!(
|
events.iter().any(|event| matches!(
|
||||||
event,
|
event,
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit{ who, amount })
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount })
|
||||||
if *who == assethub_sovereign && *amount == 2680000000000,
|
if *who == assethub_sovereign && *amount == 2680000000000,
|
||||||
)),
|
)),
|
||||||
"AssetHub sovereign takes remote fee."
|
"AssetHub sovereign takes remote fee."
|
||||||
|
|||||||
+2
-2
@@ -182,13 +182,13 @@ fn send_rocs_from_asset_hub_westend_to_asset_hub_rococo() {
|
|||||||
vec![
|
vec![
|
||||||
// ROC is withdrawn from AHW's SA on AHR
|
// ROC is withdrawn from AHW's SA on AHR
|
||||||
RuntimeEvent::Balances(
|
RuntimeEvent::Balances(
|
||||||
pallet_balances::Event::Withdraw { who, amount }
|
pallet_balances::Event::Burned { who, amount }
|
||||||
) => {
|
) => {
|
||||||
who: *who == sov_ahw_on_ahr,
|
who: *who == sov_ahw_on_ahr,
|
||||||
amount: *amount == amount_to_send,
|
amount: *amount == amount_to_send,
|
||||||
},
|
},
|
||||||
// ROCs deposited to beneficiary
|
// ROCs deposited to beneficiary
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == AssetHubRococoReceiver::get(),
|
who: *who == AssetHubRococoReceiver::get(),
|
||||||
},
|
},
|
||||||
// message processed successfully
|
// message processed successfully
|
||||||
|
|||||||
+1
-1
@@ -67,7 +67,7 @@ pub(crate) fn assert_bridge_hub_westend_message_accepted(expected_processed: boo
|
|||||||
BridgeHubWestend,
|
BridgeHubWestend,
|
||||||
vec![
|
vec![
|
||||||
// pay for bridge fees
|
// pay for bridge fees
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { .. }) => {},
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { .. }) => {},
|
||||||
// message exported
|
// message exported
|
||||||
RuntimeEvent::BridgeRococoMessages(
|
RuntimeEvent::BridgeRococoMessages(
|
||||||
pallet_bridge_messages::Event::MessageAccepted { .. }
|
pallet_bridge_messages::Event::MessageAccepted { .. }
|
||||||
|
|||||||
+2
-2
@@ -366,7 +366,7 @@ fn assert_reap_events(id_deposit: Balance, id: &Identity) {
|
|||||||
PeopleRococo,
|
PeopleRococo,
|
||||||
vec![
|
vec![
|
||||||
// Deposit and Endowed from teleport
|
// Deposit and Endowed from teleport
|
||||||
RuntimeEvent::Balances(BalancesEvent::Deposit { .. }) => {},
|
RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {},
|
||||||
RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {},
|
RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {},
|
||||||
// Amount reserved for identity info
|
// Amount reserved for identity info
|
||||||
RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => {
|
RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => {
|
||||||
@@ -392,7 +392,7 @@ fn assert_reap_events(id_deposit: Balance, id: &Identity) {
|
|||||||
PeopleRococo,
|
PeopleRococo,
|
||||||
vec![
|
vec![
|
||||||
// Deposit and Endowed from teleport
|
// Deposit and Endowed from teleport
|
||||||
RuntimeEvent::Balances(BalancesEvent::Deposit { .. }) => {},
|
RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {},
|
||||||
RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {},
|
RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {},
|
||||||
// Amount reserved for identity info
|
// Amount reserved for identity info
|
||||||
RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => {
|
RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => {
|
||||||
|
|||||||
+6
-6
@@ -25,12 +25,12 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) {
|
|||||||
Rococo,
|
Rococo,
|
||||||
vec![
|
vec![
|
||||||
// Amount to teleport is withdrawn from Sender
|
// Amount to teleport is withdrawn from Sender
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Amount to teleport is deposited in Relay's `CheckAccount`
|
// Amount to teleport is deposited in Relay's `CheckAccount`
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => {
|
||||||
who: *who == <Rococo as RococoPallet>::XcmPallet::check_account(),
|
who: *who == <Rococo as RococoPallet>::XcmPallet::check_account(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
@@ -51,12 +51,12 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) {
|
|||||||
Rococo,
|
Rococo,
|
||||||
vec![
|
vec![
|
||||||
// Amount is withdrawn from Relay Chain's `CheckAccount`
|
// Amount is withdrawn from Relay Chain's `CheckAccount`
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == <Rococo as RococoPallet>::XcmPallet::check_account(),
|
who: *who == <Rococo as RococoPallet>::XcmPallet::check_account(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Amount minus fees are deposited in Receiver's account
|
// Amount minus fees are deposited in Receiver's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -85,7 +85,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) {
|
|||||||
PeopleRococo,
|
PeopleRococo,
|
||||||
vec![
|
vec![
|
||||||
// Amount is withdrawn from Sender's account
|
// Amount is withdrawn from Sender's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
@@ -102,7 +102,7 @@ fn para_dest_assertions(t: RelayToSystemParaTest) {
|
|||||||
PeopleRococo,
|
PeopleRococo,
|
||||||
vec![
|
vec![
|
||||||
// Amount minus fees are deposited in Receiver's account
|
// Amount minus fees are deposited in Receiver's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
+2
-2
@@ -368,7 +368,7 @@ fn assert_reap_events(id_deposit: Balance, id: &Identity) {
|
|||||||
PeopleWestend,
|
PeopleWestend,
|
||||||
vec![
|
vec![
|
||||||
// Deposit and Endowed from teleport
|
// Deposit and Endowed from teleport
|
||||||
RuntimeEvent::Balances(BalancesEvent::Deposit { .. }) => {},
|
RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {},
|
||||||
RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {},
|
RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {},
|
||||||
// Amount reserved for identity info
|
// Amount reserved for identity info
|
||||||
RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => {
|
RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => {
|
||||||
@@ -394,7 +394,7 @@ fn assert_reap_events(id_deposit: Balance, id: &Identity) {
|
|||||||
PeopleWestend,
|
PeopleWestend,
|
||||||
vec![
|
vec![
|
||||||
// Deposit and Endowed from teleport
|
// Deposit and Endowed from teleport
|
||||||
RuntimeEvent::Balances(BalancesEvent::Deposit { .. }) => {},
|
RuntimeEvent::Balances(BalancesEvent::Minted { .. }) => {},
|
||||||
RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {},
|
RuntimeEvent::Balances(BalancesEvent::Endowed { .. }) => {},
|
||||||
// Amount reserved for identity info
|
// Amount reserved for identity info
|
||||||
RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => {
|
RuntimeEvent::Balances(BalancesEvent::Reserved { who, amount }) => {
|
||||||
|
|||||||
+6
-6
@@ -25,12 +25,12 @@ fn relay_origin_assertions(t: RelayToSystemParaTest) {
|
|||||||
Westend,
|
Westend,
|
||||||
vec![
|
vec![
|
||||||
// Amount to teleport is withdrawn from Sender
|
// Amount to teleport is withdrawn from Sender
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Amount to teleport is deposited in Relay's `CheckAccount`
|
// Amount to teleport is deposited in Relay's `CheckAccount`
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => {
|
||||||
who: *who == <Westend as WestendPallet>::XcmPallet::check_account(),
|
who: *who == <Westend as WestendPallet>::XcmPallet::check_account(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
@@ -51,12 +51,12 @@ fn relay_dest_assertions(t: SystemParaToRelayTest) {
|
|||||||
Westend,
|
Westend,
|
||||||
vec![
|
vec![
|
||||||
// Amount is withdrawn from Relay Chain's `CheckAccount`
|
// Amount is withdrawn from Relay Chain's `CheckAccount`
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == <Westend as WestendPallet>::XcmPallet::check_account(),
|
who: *who == <Westend as WestendPallet>::XcmPallet::check_account(),
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
// Amount minus fees are deposited in Receiver's account
|
// Amount minus fees are deposited in Receiver's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -85,7 +85,7 @@ fn para_origin_assertions(t: SystemParaToRelayTest) {
|
|||||||
PeopleWestend,
|
PeopleWestend,
|
||||||
vec![
|
vec![
|
||||||
// Amount is withdrawn from Sender's account
|
// Amount is withdrawn from Sender's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who, amount }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => {
|
||||||
who: *who == t.sender.account_id,
|
who: *who == t.sender.account_id,
|
||||||
amount: *amount == t.args.amount,
|
amount: *amount == t.args.amount,
|
||||||
},
|
},
|
||||||
@@ -102,7 +102,7 @@ fn para_dest_assertions(t: RelayToSystemParaTest) {
|
|||||||
PeopleWestend,
|
PeopleWestend,
|
||||||
vec![
|
vec![
|
||||||
// Amount minus fees are deposited in Receiver's account
|
// Amount minus fees are deposited in Receiver's account
|
||||||
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
|
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => {
|
||||||
who: *who == t.receiver.account_id,
|
who: *who == t.receiver.account_id,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -49,19 +49,18 @@ use testnet_parachains_constants::rococo::snowbridge::{
|
|||||||
EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX,
|
EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX,
|
||||||
};
|
};
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor,
|
DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor,
|
||||||
FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete,
|
FungibleAdapter, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription,
|
||||||
LocalMint, NetworkExportTableItem, NoChecking, NonFungiblesAdapter, ParentAsSuperuser,
|
IsConcrete, LocalMint, NetworkExportTableItem, NoChecking, NonFungiblesAdapter,
|
||||||
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
||||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignPaidRemoteExporter,
|
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit,
|
SovereignPaidRemoteExporter, SovereignSignedViaLocation, StartsWith,
|
||||||
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
||||||
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
||||||
|
XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||||
|
|
||||||
@@ -114,8 +113,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type FungibleTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
@@ -223,7 +221,7 @@ pub type PoolFungiblesTransactor = FungiblesAdapter<
|
|||||||
|
|
||||||
/// Means for transacting assets on this chain.
|
/// Means for transacting assets on this chain.
|
||||||
pub type AssetTransactors = (
|
pub type AssetTransactors = (
|
||||||
CurrencyTransactor,
|
FungibleTransactor,
|
||||||
FungiblesTransactor,
|
FungiblesTransactor,
|
||||||
ForeignFungiblesTransactor,
|
ForeignFungiblesTransactor,
|
||||||
PoolFungiblesTransactor,
|
PoolFungiblesTransactor,
|
||||||
|
|||||||
@@ -45,19 +45,18 @@ use polkadot_parachain_primitives::primitives::Sibling;
|
|||||||
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
||||||
use sp_runtime::traits::{AccountIdConversion, ConvertInto};
|
use sp_runtime::traits::{AccountIdConversion, ConvertInto};
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, DescribeFamily, DescribePalletTerminal, EnsureXcmOrigin,
|
DenyThenTry, DescribeFamily, DescribePalletTerminal, EnsureXcmOrigin,
|
||||||
FrameTransactionalProcessor, FungiblesAdapter, GlobalConsensusParachainConvertsFor,
|
FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter,
|
||||||
HashedDescription, IsConcrete, LocalMint, NetworkExportTableItem, NoChecking,
|
GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint,
|
||||||
NonFungiblesAdapter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
|
NetworkExportTableItem, NoChecking, NonFungiblesAdapter, ParentAsSuperuser, ParentIsPreset,
|
||||||
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
|
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
||||||
SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus,
|
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith,
|
||||||
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin,
|
StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
||||||
WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount,
|
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
||||||
|
XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||||
|
|
||||||
@@ -107,8 +106,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type FungibleTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
@@ -216,7 +214,7 @@ pub type PoolFungiblesTransactor = FungiblesAdapter<
|
|||||||
|
|
||||||
/// Means for transacting assets on this chain.
|
/// Means for transacting assets on this chain.
|
||||||
pub type AssetTransactors = (
|
pub type AssetTransactors = (
|
||||||
CurrencyTransactor,
|
FungibleTransactor,
|
||||||
FungiblesTransactor,
|
FungiblesTransactor,
|
||||||
ForeignFungiblesTransactor,
|
ForeignFungiblesTransactor,
|
||||||
PoolFungiblesTransactor,
|
PoolFungiblesTransactor,
|
||||||
|
|||||||
@@ -54,16 +54,14 @@ use sp_runtime::traits::AccountIdConversion;
|
|||||||
use sp_std::marker::PhantomData;
|
use sp_std::marker::PhantomData;
|
||||||
use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork;
|
use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
deposit_or_burn_fee, AccountId32Aliases, AllowExplicitUnpaidExecutionFrom,
|
deposit_or_burn_fee, AccountId32Aliases, AllowExplicitUnpaidExecutionFrom,
|
||||||
AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom,
|
AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom,
|
||||||
CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin,
|
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor,
|
||||||
FrameTransactionalProcessor, HandleFee, IsConcrete, ParentAsSuperuser, ParentIsPreset,
|
FungibleAdapter, HandleFee, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
|
||||||
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
|
||||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
||||||
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeToAccount,
|
||||||
XcmFeeToAccount,
|
|
||||||
};
|
};
|
||||||
use xcm_executor::{
|
use xcm_executor::{
|
||||||
traits::{FeeManager, FeeReason, FeeReason::Export, TransactAsset, WithOriginFilter},
|
traits::{FeeManager, FeeReason, FeeReason::Export, TransactAsset, WithOriginFilter},
|
||||||
@@ -96,8 +94,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type FungibleTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
@@ -285,7 +282,7 @@ pub struct XcmConfig;
|
|||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type RuntimeCall = RuntimeCall;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = CurrencyTransactor;
|
type AssetTransactor = FungibleTransactor;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
// BridgeHub does not recognize a reserve location for any asset. Users must teleport Native
|
// BridgeHub does not recognize a reserve location for any asset. Users must teleport Native
|
||||||
// token where allowed (e.g. with the Relay Chain).
|
// token where allowed (e.g. with the Relay Chain).
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ pub fn transfer_token_to_ethereum_insufficient_fund() {
|
|||||||
H160::random(),
|
H160::random(),
|
||||||
H160::random(),
|
H160::random(),
|
||||||
DefaultBridgeHubEthereumBaseFee::get(),
|
DefaultBridgeHubEthereumBaseFee::get(),
|
||||||
FailedToTransactAsset("InsufficientBalance"),
|
FailedToTransactAsset("Funds are unavailable"),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,16 +38,15 @@ use polkadot_parachain_primitives::primitives::Sibling;
|
|||||||
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
||||||
use sp_runtime::traits::AccountIdConversion;
|
use sp_runtime::traits::AccountIdConversion;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor, IsConcrete, ParentAsSuperuser,
|
DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, IsConcrete,
|
||||||
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
||||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
||||||
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
||||||
|
XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||||
|
|
||||||
@@ -76,8 +75,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type FungibleTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
@@ -233,7 +231,7 @@ pub struct XcmConfig;
|
|||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type RuntimeCall = RuntimeCall;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = CurrencyTransactor;
|
type AssetTransactor = FungibleTransactor;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
// BridgeHub does not recognize a reserve location for any asset. Users must teleport Native
|
// BridgeHub does not recognize a reserve location for any asset. Users must teleport Native
|
||||||
// token where allowed (e.g. with the Relay Chain).
|
// token where allowed (e.g. with the Relay Chain).
|
||||||
|
|||||||
@@ -36,13 +36,11 @@ use polkadot_parachain_primitives::primitives::Sibling;
|
|||||||
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
||||||
use westend_runtime_constants::xcm as xcm_constants;
|
use westend_runtime_constants::xcm as xcm_constants;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, IsConcrete,
|
DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter,
|
||||||
LocatableAssetId, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset,
|
IsConcrete, LocatableAssetId, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset,
|
||||||
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
||||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
||||||
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
|
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
|
||||||
@@ -85,9 +83,8 @@ pub type LocationToAccountId = (
|
|||||||
AccountId32Aliases<RelayNetwork, AccountId>,
|
AccountId32Aliases<RelayNetwork, AccountId>,
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.#[allow(deprecated)]
|
||||||
#[allow(deprecated)]
|
pub type FungibleTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
@@ -262,7 +259,7 @@ pub struct XcmConfig;
|
|||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type RuntimeCall = RuntimeCall;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = CurrencyTransactor;
|
type AssetTransactor = FungibleTransactor;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
// Collectives does not recognize a reserve location for any asset. Users must teleport WND
|
// Collectives does not recognize a reserve location for any asset. Users must teleport WND
|
||||||
// where allowed (e.g. with the Relay Chain).
|
// where allowed (e.g. with the Relay Chain).
|
||||||
|
|||||||
@@ -37,16 +37,15 @@ use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
|||||||
use sp_runtime::traits::AccountIdConversion;
|
use sp_runtime::traits::AccountIdConversion;
|
||||||
use testnet_parachains_constants::rococo::currency::CENTS;
|
use testnet_parachains_constants::rococo::currency::CENTS;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, IsConcrete,
|
DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter,
|
||||||
NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
|
||||||
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
|
||||||
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
||||||
WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount,
|
UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
||||||
|
XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::XcmExecutor;
|
use xcm_executor::XcmExecutor;
|
||||||
|
|
||||||
@@ -79,8 +78,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type CurrencyTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -38,17 +38,15 @@ use polkadot_parachain_primitives::primitives::Sibling;
|
|||||||
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
||||||
use sp_runtime::traits::AccountIdConversion;
|
use sp_runtime::traits::AccountIdConversion;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor, IsConcrete, NonFungibleAdapter,
|
DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, IsConcrete,
|
||||||
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
NonFungibleAdapter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
|
||||||
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
|
||||||
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
||||||
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||||
XcmFeeToAccount,
|
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||||
|
|
||||||
@@ -79,8 +77,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type CurrencyTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -37,16 +37,15 @@ use polkadot_parachain_primitives::primitives::Sibling;
|
|||||||
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
||||||
use sp_runtime::traits::AccountIdConversion;
|
use sp_runtime::traits::AccountIdConversion;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor, IsConcrete, ParentAsSuperuser,
|
DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, IsConcrete,
|
||||||
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
||||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
||||||
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
||||||
|
XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||||
|
|
||||||
@@ -75,8 +74,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type CurrencyTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -34,17 +34,15 @@ use parachains_common::{
|
|||||||
use polkadot_parachain_primitives::primitives::Sibling;
|
use polkadot_parachain_primitives::primitives::Sibling;
|
||||||
use sp_runtime::traits::AccountIdConversion;
|
use sp_runtime::traits::AccountIdConversion;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, DescribeTerminus, EnsureXcmOrigin, FrameTransactionalProcessor, HashedDescription,
|
DenyThenTry, DescribeTerminus, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter,
|
||||||
IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
|
||||||
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
|
||||||
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
||||||
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||||
XcmFeeToAccount,
|
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||||
|
|
||||||
@@ -97,8 +95,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type FungibleTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
@@ -244,7 +241,7 @@ pub struct XcmConfig;
|
|||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type RuntimeCall = RuntimeCall;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = CurrencyTransactor;
|
type AssetTransactor = FungibleTransactor;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
// People chain does not recognize a reserve location for any asset. Users must teleport ROC
|
// People chain does not recognize a reserve location for any asset. Users must teleport ROC
|
||||||
// where allowed (e.g. with the Relay Chain).
|
// where allowed (e.g. with the Relay Chain).
|
||||||
|
|||||||
@@ -34,17 +34,15 @@ use parachains_common::{
|
|||||||
use polkadot_parachain_primitives::primitives::Sibling;
|
use polkadot_parachain_primitives::primitives::Sibling;
|
||||||
use sp_runtime::traits::AccountIdConversion;
|
use sp_runtime::traits::AccountIdConversion;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain,
|
||||||
DenyThenTry, DescribeTerminus, EnsureXcmOrigin, FrameTransactionalProcessor, HashedDescription,
|
DenyThenTry, DescribeTerminus, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter,
|
||||||
IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
|
||||||
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
|
||||||
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
||||||
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||||
XcmFeeToAccount,
|
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
|
||||||
|
|
||||||
@@ -97,8 +95,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting the native currency on this chain.
|
/// Means for transacting the native currency on this chain.
|
||||||
#[allow(deprecated)]
|
pub type FungibleTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
@@ -252,7 +249,7 @@ pub struct XcmConfig;
|
|||||||
impl xcm_executor::Config for XcmConfig {
|
impl xcm_executor::Config for XcmConfig {
|
||||||
type RuntimeCall = RuntimeCall;
|
type RuntimeCall = RuntimeCall;
|
||||||
type XcmSender = XcmRouter;
|
type XcmSender = XcmRouter;
|
||||||
type AssetTransactor = CurrencyTransactor;
|
type AssetTransactor = FungibleTransactor;
|
||||||
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
type OriginConverter = XcmOriginToTransactDispatchOrigin;
|
||||||
// People does not recognize a reserve location for any asset. Users must teleport WND
|
// People does not recognize a reserve location for any asset. Users must teleport WND
|
||||||
// where allowed (e.g. with the Relay Chain).
|
// where allowed (e.g. with the Relay Chain).
|
||||||
|
|||||||
@@ -45,12 +45,11 @@ use polkadot_runtime_common::impls::ToAuthor;
|
|||||||
use sp_runtime::traits::Zero;
|
use sp_runtime::traits::Zero;
|
||||||
use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork;
|
use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex,
|
||||||
ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds,
|
ConvertedConcreteId, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor,
|
||||||
FrameTransactionalProcessor, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, NoChecking,
|
FungibleAdapter, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, NoChecking,
|
||||||
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
||||||
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
SovereignSignedViaLocation, StartsWith, TakeWeightCredit, TrailingSetTopicAsId,
|
SovereignSignedViaLocation, StartsWith, TakeWeightCredit, TrailingSetTopicAsId,
|
||||||
@@ -78,8 +77,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting assets on this chain.
|
/// Means for transacting assets on this chain.
|
||||||
#[allow(deprecated)]
|
pub type CurrencyTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -84,14 +84,12 @@ use xcm_executor::traits::JustTry;
|
|||||||
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough};
|
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough};
|
||||||
use polkadot_parachain_primitives::primitives::Sibling;
|
use polkadot_parachain_primitives::primitives::Sibling;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
|
||||||
EnsureXcmOrigin, FixedWeightBounds, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset,
|
EnsureXcmOrigin, FixedWeightBounds, FungibleAdapter, IsConcrete, NativeAsset,
|
||||||
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
|
||||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
UsingComponents,
|
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
|
||||||
};
|
};
|
||||||
use xcm_executor::XcmExecutor;
|
use xcm_executor::XcmExecutor;
|
||||||
|
|
||||||
@@ -350,8 +348,7 @@ pub type LocationToAccountId = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Means for transacting assets on this chain.
|
/// Means for transacting assets on this chain.
|
||||||
#[allow(deprecated)]
|
pub type CurrencyTransactor = FungibleAdapter<
|
||||||
pub type CurrencyTransactor = CurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -36,17 +36,15 @@ use runtime_common::{
|
|||||||
};
|
};
|
||||||
use sp_core::ConstU32;
|
use sp_core::ConstU32;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
|
||||||
ChildParachainConvertsVia, DescribeBodyTerminal, DescribeFamily, FixedWeightBounds,
|
ChildParachainConvertsVia, DescribeBodyTerminal, DescribeFamily, FixedWeightBounds,
|
||||||
FrameTransactionalProcessor, HashedDescription, IsChildSystemParachain, IsConcrete,
|
FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsChildSystemParachain,
|
||||||
MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
|
IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
|
||||||
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
|
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
||||||
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents,
|
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||||
XcmFeeToAccount,
|
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::XcmExecutor;
|
use xcm_executor::XcmExecutor;
|
||||||
|
|
||||||
@@ -73,8 +71,7 @@ pub type LocationConverter = (
|
|||||||
/// point of view of XCM-only concepts like `Location` and `Asset`.
|
/// point of view of XCM-only concepts like `Location` and `Asset`.
|
||||||
///
|
///
|
||||||
/// Ours is only aware of the Balances pallet, which is mapped to `RocLocation`.
|
/// Ours is only aware of the Balances pallet, which is mapped to `RocLocation`.
|
||||||
#[allow(deprecated)]
|
pub type LocalAssetTransactor = FungibleAdapter<
|
||||||
pub type LocalAssetTransactor = XcmCurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -39,15 +39,13 @@ use westend_runtime_constants::{
|
|||||||
xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX},
|
xcm::body::{FELLOWSHIP_ADMIN_INDEX, TREASURER_INDEX},
|
||||||
};
|
};
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||||
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
|
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
|
||||||
ChildParachainConvertsVia, DescribeBodyTerminal, DescribeFamily, FrameTransactionalProcessor,
|
ChildParachainConvertsVia, DescribeBodyTerminal, DescribeFamily, FrameTransactionalProcessor,
|
||||||
HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
|
FungibleAdapter, HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice,
|
||||||
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
|
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
||||||
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||||
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
XcmFeeManagerFromComponents, XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
use xcm_executor::XcmExecutor;
|
use xcm_executor::XcmExecutor;
|
||||||
@@ -75,8 +73,7 @@ pub type LocationConverter = (
|
|||||||
HashedDescription<AccountId, DescribeFamily<DescribeBodyTerminal>>,
|
HashedDescription<AccountId, DescribeFamily<DescribeBodyTerminal>>,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[allow(deprecated)]
|
pub type LocalAssetTransactor = FungibleAdapter<
|
||||||
pub type LocalAssetTransactor = XcmCurrencyAdapter<
|
|
||||||
// Use this currency:
|
// Use this currency:
|
||||||
Balances,
|
Balances,
|
||||||
// Use this currency when it is a fungible asset matching the given location or name:
|
// Use this currency when it is a fungible asset matching the given location or name:
|
||||||
|
|||||||
@@ -64,13 +64,16 @@ benchmarks_instance_pallet! {
|
|||||||
transfer_asset {
|
transfer_asset {
|
||||||
let (sender_account, sender_location) = account_and_location::<T>(1);
|
let (sender_account, sender_location) = account_and_location::<T>(1);
|
||||||
let asset = T::get_asset();
|
let asset = T::get_asset();
|
||||||
let assets: Assets = vec![ asset.clone() ].into();
|
let assets: Assets = vec![asset.clone()].into();
|
||||||
// this xcm doesn't use holding
|
// this xcm doesn't use holding
|
||||||
|
|
||||||
let dest_location = T::valid_destination()?;
|
let dest_location = T::valid_destination()?;
|
||||||
let dest_account = T::AccountIdConverter::convert_location(&dest_location).unwrap();
|
let dest_account = T::AccountIdConverter::convert_location(&dest_location).unwrap();
|
||||||
|
|
||||||
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
|
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
|
||||||
|
// We deposit the asset twice so we have enough for ED after transferring
|
||||||
|
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
|
||||||
|
let sender_account_balance_before = T::TransactAsset::balance(&sender_account);
|
||||||
assert!(T::TransactAsset::balance(&dest_account).is_zero());
|
assert!(T::TransactAsset::balance(&dest_account).is_zero());
|
||||||
|
|
||||||
let mut executor = new_executor::<T>(sender_location);
|
let mut executor = new_executor::<T>(sender_location);
|
||||||
@@ -79,7 +82,7 @@ benchmarks_instance_pallet! {
|
|||||||
}: {
|
}: {
|
||||||
executor.bench_process(xcm)?;
|
executor.bench_process(xcm)?;
|
||||||
} verify {
|
} verify {
|
||||||
assert!(T::TransactAsset::balance(&sender_account).is_zero());
|
assert!(T::TransactAsset::balance(&sender_account) < sender_account_balance_before);
|
||||||
assert!(!T::TransactAsset::balance(&dest_account).is_zero());
|
assert!(!T::TransactAsset::balance(&dest_account).is_zero());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,11 +96,12 @@ benchmarks_instance_pallet! {
|
|||||||
&dest_location,
|
&dest_location,
|
||||||
FeeReason::TransferReserveAsset
|
FeeReason::TransferReserveAsset
|
||||||
);
|
);
|
||||||
let sender_account_balance_before = T::TransactAsset::balance(&sender_account);
|
|
||||||
|
|
||||||
let asset = T::get_asset();
|
let asset = T::get_asset();
|
||||||
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
|
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
|
||||||
assert!(T::TransactAsset::balance(&sender_account) > sender_account_balance_before);
|
// We deposit the asset twice so we have enough for ED after transferring
|
||||||
|
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
|
||||||
|
let sender_account_balance_before = T::TransactAsset::balance(&sender_account);
|
||||||
let assets: Assets = vec![asset].into();
|
let assets: Assets = vec![asset].into();
|
||||||
assert!(T::TransactAsset::balance(&dest_account).is_zero());
|
assert!(T::TransactAsset::balance(&dest_account).is_zero());
|
||||||
|
|
||||||
|
|||||||
@@ -103,8 +103,7 @@ impl xcm_executor::traits::MatchesFungible<u64> for MatchAnyFungible {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use balances as the asset transactor.
|
// Use balances as the asset transactor.
|
||||||
#[allow(deprecated)]
|
pub type AssetTransactor = xcm_builder::FungibleAdapter<
|
||||||
pub type AssetTransactor = xcm_builder::CurrencyAdapter<
|
|
||||||
Balances,
|
Balances,
|
||||||
MatchAnyFungible,
|
MatchAnyFungible,
|
||||||
AccountIdConverter,
|
AccountIdConverter,
|
||||||
@@ -192,8 +191,7 @@ impl xcm_balances_benchmark::Config for Test {
|
|||||||
type TrustedReserve = TrustedReserve;
|
type TrustedReserve = TrustedReserve;
|
||||||
|
|
||||||
fn get_asset() -> Asset {
|
fn get_asset() -> Asset {
|
||||||
let amount =
|
let amount = 1_000_000_000_000;
|
||||||
<Balances as frame_support::traits::fungible::Inspect<u64>>::minimum_balance() as u128;
|
|
||||||
Asset { id: AssetId(Here.into()), fun: Fungible(amount) }
|
Asset { id: AssetId(Here.into()), fun: Fungible(amount) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,13 +30,11 @@ use sp_core::H256;
|
|||||||
use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage};
|
use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage};
|
||||||
pub use sp_std::cell::RefCell;
|
pub use sp_std::cell::RefCell;
|
||||||
use xcm::prelude::*;
|
use xcm::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom,
|
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom,
|
||||||
AllowTopLevelPaidExecutionFrom, Case, ChildParachainAsNative, ChildParachainConvertsVia,
|
AllowTopLevelPaidExecutionFrom, Case, ChildParachainAsNative, ChildParachainConvertsVia,
|
||||||
ChildSystemParachainAsSuperuser, DescribeAllTerminal, FixedRateOfFungible, FixedWeightBounds,
|
ChildSystemParachainAsSuperuser, DescribeAllTerminal, FixedRateOfFungible, FixedWeightBounds,
|
||||||
FrameTransactionalProcessor, FungiblesAdapter, HashedDescription, IsConcrete,
|
FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, HashedDescription, IsConcrete,
|
||||||
MatchedConvertedConcreteId, NoChecking, SignedAccountId32AsNative, SignedToAccountId32,
|
MatchedConvertedConcreteId, NoChecking, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
SovereignSignedViaLocation, TakeWeightCredit, XcmFeeManagerFromComponents, XcmFeeToAccount,
|
SovereignSignedViaLocation, TakeWeightCredit, XcmFeeManagerFromComponents, XcmFeeToAccount,
|
||||||
};
|
};
|
||||||
@@ -424,9 +422,8 @@ pub type ForeignAssetsConvertedConcreteId = MatchedConvertedConcreteId<
|
|||||||
JustTry,
|
JustTry,
|
||||||
>;
|
>;
|
||||||
|
|
||||||
#[allow(deprecated)]
|
|
||||||
pub type AssetTransactors = (
|
pub type AssetTransactors = (
|
||||||
XcmCurrencyAdapter<Balances, IsConcrete<RelayLocation>, SovereignAccountOf, AccountId, ()>,
|
FungibleAdapter<Balances, IsConcrete<RelayLocation>, SovereignAccountOf, AccountId, ()>,
|
||||||
FungiblesAdapter<
|
FungiblesAdapter<
|
||||||
AssetsPallet,
|
AssetsPallet,
|
||||||
ForeignAssetsConvertedConcreteId,
|
ForeignAssetsConvertedConcreteId,
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ impl<
|
|||||||
) -> result::Result<AssetsInHolding, XcmError> {
|
) -> result::Result<AssetsInHolding, XcmError> {
|
||||||
log::trace!(
|
log::trace!(
|
||||||
target: "xcm::fungible_adapter",
|
target: "xcm::fungible_adapter",
|
||||||
"deposit_asset what: {:?}, who: {:?}",
|
"withdraw_asset what: {:?}, who: {:?}",
|
||||||
what, who,
|
what, who,
|
||||||
);
|
);
|
||||||
let amount = Matcher::matches_fungible(what).ok_or(MatchError::AssetNotHandled)?;
|
let amount = Matcher::matches_fungible(what).ok_or(MatchError::AssetNotHandled)?;
|
||||||
|
|||||||
@@ -32,14 +32,12 @@ use xcm_executor::XcmExecutor;
|
|||||||
|
|
||||||
use staging_xcm_builder as xcm_builder;
|
use staging_xcm_builder as xcm_builder;
|
||||||
|
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom,
|
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom,
|
||||||
ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
|
ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
|
||||||
FixedRateOfFungible, FixedWeightBounds, IsChildSystemParachain, IsConcrete, MintLocation,
|
FixedRateOfFungible, FixedWeightBounds, FungibleAdapter, IsChildSystemParachain, IsConcrete,
|
||||||
RespectSuspension, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
|
MintLocation, RespectSuspension, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
TakeWeightCredit,
|
SovereignSignedViaLocation, TakeWeightCredit,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub type AccountId = AccountId32;
|
pub type AccountId = AccountId32;
|
||||||
@@ -146,14 +144,8 @@ parameter_types! {
|
|||||||
pub type SovereignAccountOf =
|
pub type SovereignAccountOf =
|
||||||
(ChildParachainConvertsVia<ParaId, AccountId>, AccountId32Aliases<KusamaNetwork, AccountId>);
|
(ChildParachainConvertsVia<ParaId, AccountId>, AccountId32Aliases<KusamaNetwork, AccountId>);
|
||||||
|
|
||||||
#[allow(deprecated)]
|
pub type LocalCurrencyAdapter =
|
||||||
pub type LocalCurrencyAdapter = XcmCurrencyAdapter<
|
FungibleAdapter<Balances, IsConcrete<KsmLocation>, SovereignAccountOf, AccountId, CheckAccount>;
|
||||||
Balances,
|
|
||||||
IsConcrete<KsmLocation>,
|
|
||||||
SovereignAccountOf,
|
|
||||||
AccountId,
|
|
||||||
CheckAccount,
|
|
||||||
>;
|
|
||||||
|
|
||||||
pub type LocalAssetTransactor = (LocalCurrencyAdapter,);
|
pub type LocalAssetTransactor = (LocalCurrencyAdapter,);
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,10 @@ use polkadot_parachain_primitives::primitives::{
|
|||||||
DmpMessageHandler, Id as ParaId, Sibling, XcmpMessageFormat, XcmpMessageHandler,
|
DmpMessageHandler, Id as ParaId, Sibling, XcmpMessageFormat, XcmpMessageHandler,
|
||||||
};
|
};
|
||||||
use xcm::{latest::prelude::*, VersionedXcm};
|
use xcm::{latest::prelude::*, VersionedXcm};
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowUnpaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible,
|
AccountId32Aliases, AllowUnpaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible,
|
||||||
FixedWeightBounds, FrameTransactionalProcessor, IsConcrete, NativeAsset, ParentIsPreset,
|
FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, IsConcrete, NativeAsset,
|
||||||
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
ParentIsPreset, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
SovereignSignedViaLocation,
|
SovereignSignedViaLocation,
|
||||||
};
|
};
|
||||||
use xcm_executor::{Config, XcmExecutor};
|
use xcm_executor::{Config, XcmExecutor};
|
||||||
@@ -125,9 +123,8 @@ parameter_types! {
|
|||||||
pub const MaxAssetsIntoHolding: u32 = 64;
|
pub const MaxAssetsIntoHolding: u32 = 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(deprecated)]
|
|
||||||
pub type LocalAssetTransactor =
|
pub type LocalAssetTransactor =
|
||||||
XcmCurrencyAdapter<Balances, IsConcrete<KsmLocation>, LocationToAccountId, AccountId, ()>;
|
FungibleAdapter<Balances, IsConcrete<KsmLocation>, LocationToAccountId, AccountId, ()>;
|
||||||
|
|
||||||
pub type XcmRouter = super::ParachainXcmRouter<MsgQueue>;
|
pub type XcmRouter = super::ParachainXcmRouter<MsgQueue>;
|
||||||
pub type Barrier = AllowUnpaidExecutionFrom<Everything>;
|
pub type Barrier = AllowUnpaidExecutionFrom<Everything>;
|
||||||
|
|||||||
@@ -37,13 +37,11 @@ use polkadot_runtime_parachains::{
|
|||||||
origin, shared,
|
origin, shared,
|
||||||
};
|
};
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowUnpaidExecutionFrom, ChildParachainAsNative,
|
AccountId32Aliases, AllowUnpaidExecutionFrom, ChildParachainAsNative,
|
||||||
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, FixedRateOfFungible,
|
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, FixedRateOfFungible,
|
||||||
FixedWeightBounds, FrameTransactionalProcessor, IsConcrete, SignedAccountId32AsNative,
|
FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, IsConcrete,
|
||||||
SignedToAccountId32, SovereignSignedViaLocation,
|
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation,
|
||||||
};
|
};
|
||||||
use xcm_executor::{Config, XcmExecutor};
|
use xcm_executor::{Config, XcmExecutor};
|
||||||
|
|
||||||
@@ -112,9 +110,8 @@ parameter_types! {
|
|||||||
pub type SovereignAccountOf =
|
pub type SovereignAccountOf =
|
||||||
(ChildParachainConvertsVia<ParaId, AccountId>, AccountId32Aliases<ThisNetwork, AccountId>);
|
(ChildParachainConvertsVia<ParaId, AccountId>, AccountId32Aliases<ThisNetwork, AccountId>);
|
||||||
|
|
||||||
#[allow(deprecated)]
|
|
||||||
pub type LocalAssetTransactor =
|
pub type LocalAssetTransactor =
|
||||||
XcmCurrencyAdapter<Balances, IsConcrete<TokenLocation>, SovereignAccountOf, AccountId, ()>;
|
FungibleAdapter<Balances, IsConcrete<TokenLocation>, SovereignAccountOf, AccountId, ()>;
|
||||||
|
|
||||||
type LocalOriginConverter = (
|
type LocalOriginConverter = (
|
||||||
SovereignSignedViaLocation<SovereignAccountOf, RuntimeOrigin>,
|
SovereignSignedViaLocation<SovereignAccountOf, RuntimeOrigin>,
|
||||||
|
|||||||
@@ -37,13 +37,11 @@ use sp_runtime::traits::{Get, IdentityLookup, MaybeEquivalence};
|
|||||||
|
|
||||||
use sp_std::prelude::*;
|
use sp_std::prelude::*;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
|
||||||
ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds,
|
ConvertedConcreteId, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds,
|
||||||
FrameTransactionalProcessor, FungiblesAdapter, IsConcrete, NativeAsset, NoChecking,
|
FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, IsConcrete, NativeAsset,
|
||||||
ParentAsSuperuser, ParentIsPreset, SignedAccountId32AsNative, SignedToAccountId32,
|
NoChecking, ParentAsSuperuser, ParentIsPreset, SignedAccountId32AsNative, SignedToAccountId32,
|
||||||
SovereignSignedViaLocation, WithComputedOrigin,
|
SovereignSignedViaLocation, WithComputedOrigin,
|
||||||
};
|
};
|
||||||
use xcm_executor::{traits::JustTry, Config, XcmExecutor};
|
use xcm_executor::{traits::JustTry, Config, XcmExecutor};
|
||||||
@@ -184,9 +182,8 @@ pub fn estimate_fee_for_weight(weight: Weight) -> u128 {
|
|||||||
units_per_mb * (weight.proof_size() as u128) / (WEIGHT_PROOF_SIZE_PER_MB as u128)
|
units_per_mb * (weight.proof_size() as u128) / (WEIGHT_PROOF_SIZE_PER_MB as u128)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(deprecated)]
|
|
||||||
pub type LocalBalancesTransactor =
|
pub type LocalBalancesTransactor =
|
||||||
XcmCurrencyAdapter<Balances, IsConcrete<TokenLocation>, SovereignAccountOf, AccountId, ()>;
|
FungibleAdapter<Balances, IsConcrete<TokenLocation>, SovereignAccountOf, AccountId, ()>;
|
||||||
|
|
||||||
pub struct FromLocationToAsset<Location, AssetId>(PhantomData<(Location, AssetId)>);
|
pub struct FromLocationToAsset<Location, AssetId>(PhantomData<(Location, AssetId)>);
|
||||||
impl MaybeEquivalence<Location, AssetIdForAssets>
|
impl MaybeEquivalence<Location, AssetIdForAssets>
|
||||||
|
|||||||
@@ -29,13 +29,11 @@ use sp_runtime::traits::IdentityLookup;
|
|||||||
use polkadot_parachain_primitives::primitives::Id as ParaId;
|
use polkadot_parachain_primitives::primitives::Id as ParaId;
|
||||||
use polkadot_runtime_parachains::{configuration, origin, shared};
|
use polkadot_runtime_parachains::{configuration, origin, shared};
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
#[allow(deprecated)]
|
|
||||||
use xcm_builder::CurrencyAdapter as XcmCurrencyAdapter;
|
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowSubscriptionsFrom,
|
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowSubscriptionsFrom,
|
||||||
AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia,
|
AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia,
|
||||||
ChildSystemParachainAsSuperuser, DescribeAllTerminal, DescribeFamily, FixedRateOfFungible,
|
ChildSystemParachainAsSuperuser, DescribeAllTerminal, DescribeFamily, FixedRateOfFungible,
|
||||||
FixedWeightBounds, FrameTransactionalProcessor, HashedDescription, IsConcrete,
|
FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete,
|
||||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, WithComputedOrigin,
|
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, WithComputedOrigin,
|
||||||
};
|
};
|
||||||
use xcm_executor::{Config, XcmExecutor};
|
use xcm_executor::{Config, XcmExecutor};
|
||||||
@@ -119,9 +117,8 @@ pub type SovereignAccountOf = (
|
|||||||
ChildParachainConvertsVia<ParaId, AccountId>,
|
ChildParachainConvertsVia<ParaId, AccountId>,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[allow(deprecated)]
|
|
||||||
pub type LocalBalancesTransactor =
|
pub type LocalBalancesTransactor =
|
||||||
XcmCurrencyAdapter<Balances, IsConcrete<TokenLocation>, SovereignAccountOf, AccountId, ()>;
|
FungibleAdapter<Balances, IsConcrete<TokenLocation>, SovereignAccountOf, AccountId, ()>;
|
||||||
|
|
||||||
pub type AssetTransactors = LocalBalancesTransactor;
|
pub type AssetTransactors = LocalBalancesTransactor;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user