diff --git a/cumulus/parachains/integration-tests/emulated/common/src/macros.rs b/cumulus/parachains/integration-tests/emulated/common/src/macros.rs index de969d665e8fa..8becead154078 100644 --- a/cumulus/parachains/integration-tests/emulated/common/src/macros.rs +++ b/cumulus/parachains/integration-tests/emulated/common/src/macros.rs @@ -512,8 +512,11 @@ macro_rules! test_can_estimate_and_pay_exact_fees { assert_eq!(messages_to_query.len(), 1); remote_message = messages_to_query[0].clone(); let delivery_fees = - Runtime::query_delivery_fees(destination_to_query.clone(), remote_message.clone()) - .unwrap(); + Runtime::query_delivery_fees( + destination_to_query.clone(), + remote_message.clone(), + VersionedAssetId::from(AssetId(Location::parent())) + ).unwrap(); local_delivery_fees = $crate::xcm_helpers::get_amount_from_versioned_assets(delivery_fees); }); @@ -556,6 +559,7 @@ macro_rules! test_can_estimate_and_pay_exact_fees { let delivery_fees = Runtime::query_delivery_fees( destination_to_query.clone(), intermediate_remote_message.clone(), + VersionedAssetId::from(AssetId(Location::new(1, []))), ) .unwrap(); intermediate_delivery_fees = $crate::xcm_helpers::get_amount_from_versioned_assets(delivery_fees); @@ -683,7 +687,7 @@ macro_rules! test_xcm_fee_querying_apis_work_for_asset_hub { ( $asset_hub:ty ) => { $crate::macros::paste::paste! { use emulated_integration_tests_common::USDT_ID; - use xcm_runtime_apis::fees::{Error as XcmPaymentApiError, runtime_decl_for_xcm_payment_api::XcmPaymentApiV1}; + use xcm_runtime_apis::fees::{Error as XcmPaymentApiError, runtime_decl_for_xcm_payment_api::XcmPaymentApiV2}; $asset_hub::execute_with(|| { // Setup a pool between USDT and WND. diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/xcm_fee_estimation.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/xcm_fee_estimation.rs index 6e3b893e3f6c7..2d535a3650b43 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/xcm_fee_estimation.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/xcm_fee_estimation.rs @@ -20,7 +20,7 @@ use emulated_integration_tests_common::test_can_estimate_and_pay_exact_fees; use frame_support::dispatch::RawOrigin; use xcm_runtime_apis::{ dry_run::runtime_decl_for_dry_run_api::DryRunApiV2, - fees::runtime_decl_for_xcm_payment_api::XcmPaymentApiV1, + fees::runtime_decl_for_xcm_payment_api::XcmPaymentApiV2, }; fn sender_assertions(test: ParaToParaThroughAHTest) { @@ -157,8 +157,9 @@ fn multi_hop_works() { .unwrap(); assert_eq!(messages_to_query.len(), 1); remote_message = messages_to_query[0].clone(); + let versioned_asset_id = VersionedAssetId::from(AssetId(Location::new(1, []))); let delivery_fees = - Runtime::query_delivery_fees(destination_to_query.clone(), remote_message.clone()) + Runtime::query_delivery_fees(destination_to_query.clone(), remote_message.clone(), versioned_asset_id) .unwrap(); delivery_fees_amount = get_amount_from_versioned_assets(delivery_fees); }); @@ -203,6 +204,7 @@ fn multi_hop_works() { let delivery_fees = Runtime::query_delivery_fees( destination_to_query.clone(), intermediate_remote_message.clone(), + VersionedAssetId::from(AssetId(Location::here())), ) .unwrap(); intermediate_delivery_fees_amount = get_amount_from_versioned_assets(delivery_fees); diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/xcm_fee_estimation.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/xcm_fee_estimation.rs index 7deaaa9a984f9..defa8944717fa 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/xcm_fee_estimation.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/xcm_fee_estimation.rs @@ -21,7 +21,7 @@ use emulated_integration_tests_common::test_can_estimate_and_pay_exact_fees; use frame_support::dispatch::RawOrigin; use xcm_runtime_apis::{ dry_run::runtime_decl_for_dry_run_api::DryRunApiV2, - fees::runtime_decl_for_xcm_payment_api::XcmPaymentApiV1, + fees::runtime_decl_for_xcm_payment_api::XcmPaymentApiV2, }; fn sender_assertions(test: ParaToParaThroughAHTest) { @@ -160,7 +160,7 @@ fn multi_hop_works() { assert_eq!(messages_to_query.len(), 1); remote_message = messages_to_query[0].clone(); let delivery_fees = - Runtime::query_delivery_fees(destination_to_query.clone(), remote_message.clone()) + Runtime::query_delivery_fees(destination_to_query.clone(), remote_message.clone(), VersionedAssetId::from(AssetId(Location::parent()))) .unwrap(); delivery_fees_amount = get_amount_from_versioned_assets(delivery_fees); }); @@ -205,6 +205,7 @@ fn multi_hop_works() { let delivery_fees = Runtime::query_delivery_fees( destination_to_query.clone(), intermediate_remote_message.clone(), + VersionedAssetId::from(AssetId(Location::new(1, [Parachain(2001)]))), ) .unwrap(); intermediate_delivery_fees_amount = get_amount_from_versioned_assets(delivery_fees); diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 52952d47dd22e..d1e4c9474d30b 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -1588,7 +1588,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _asset: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 4cf540a2f8b19..120c288c7290a 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -101,7 +101,7 @@ use assets_common::{ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::{ - latest::prelude::AssetId, + latest::prelude::{AssetId, Asset, Assets as XcmAssets, Fungible}, prelude::{VersionedAsset, VersionedAssetId, VersionedAssets, VersionedLocation, VersionedXcm}, Version as XcmVersion, }; @@ -111,7 +111,7 @@ use frame_support::traits::PalletInfoAccess; #[cfg(feature = "runtime-benchmarks")] use xcm::latest::prelude::{ - Asset, Assets as XcmAssets, Fungible, Here, InteriorLocation, Junction, Junction::*, Location, + Here, InteriorLocation, Junction, Junction::*, Location, NetworkId, NonFungible, Parent, ParentThen, Response, XCM_VERSION, }; @@ -1725,8 +1725,49 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { - PolkadotXcm::query_delivery_fees(destination, message) + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, asset: VersionedAssetId) -> Result { + let fee_in_native = PolkadotXcm::query_delivery_fees(destination, message)?; + let asset_id: Result = asset.clone().try_into(); + let native_asset = xcm_config::WestendLocation::get(); + match asset_id { + // For native asset there is no need to convert. + Ok(asset_id) if asset_id.0 == native_asset => { + Ok(fee_in_native) + }, + Ok(asset_id) => { + let fee: XcmAssets = fee_in_native.clone().try_into().map_err(|()| { + log::trace!(target: "xcm::xcm_runtime_apis", "query_delivery_fees - failed to convert fee: {fee_in_native:?}!"); + XcmPaymentApiError::VersionedConversionFailed + })?; + + // Convert Fee to Fungible + let Fungible(balance) = fee.inner()[0].fun else { + unreachable!("fee is fungible"); + }; + + // Try to get current price of `asset_id` in `native_asset`. + if let Ok(Some(swapped_in_native)) = assets_common::PoolAdapter::::quote_price_tokens_for_exact_tokens( + asset_id.0.clone(), + native_asset, + balance, + true, + ) { + // convert Balance to VersionedAssets + let converted_asset = Asset { + id: asset_id, + fun: Fungible(swapped_in_native), + }; + Ok(vec![converted_asset].into()) + } else { + log::trace!(target: "xcm::xcm_runtime_apis", "query_delivery_fees - unhandled asset_id: {asset_id:?}!"); + Err(XcmPaymentApiError::AssetNotFound) + } + }, + Err(_) => { + log::trace!(target: "xcm::xcm_runtime_apis", "query_delivery_fees - failed to convert asset: {asset:?}!"); + Err(XcmPaymentApiError::VersionedConversionFailed) + } + } } } diff --git a/cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs b/cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs index 8466af761a4e4..17b76f649a5dd 100644 --- a/cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs +++ b/cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs @@ -40,7 +40,7 @@ use sp_runtime::{ use xcm::{latest::prelude::*, VersionedAssets}; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; use xcm_runtime_apis::fees::{ - runtime_decl_for_xcm_payment_api::XcmPaymentApiV1, Error as XcmPaymentApiError, + runtime_decl_for_xcm_payment_api::XcmPaymentApiV2, Error as XcmPaymentApiError, }; type RuntimeHelper = @@ -1600,7 +1600,7 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works< pub fn xcm_payment_api_with_pools_works() where - Runtime: XcmPaymentApiV1 + Runtime: XcmPaymentApiV2 + frame_system::Config + pallet_balances::Config + pallet_session::Config diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 5aca100e1646f..2bf31613db3ae 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -884,7 +884,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 4b65b3789a338..214bebed8ffc1 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -835,7 +835,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 721a513b607d4..93b1ec72e7c73 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -1005,7 +1005,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 89345846acc5d..2a629b3b427fb 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -872,7 +872,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index c2c49067d877a..35c406f9cecd9 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -873,7 +873,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 0e3189a1dc4d9..dde89828b949c 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -820,7 +820,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 3997707ed2a96..00623a90246ac 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -818,7 +818,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/cumulus/parachains/runtimes/test-utils/src/test_cases.rs b/cumulus/parachains/runtimes/test-utils/src/test_cases.rs index c6b1ccdac3c12..bebb2ddffb32e 100644 --- a/cumulus/parachains/runtimes/test-utils/src/test_cases.rs +++ b/cumulus/parachains/runtimes/test-utils/src/test_cases.rs @@ -32,7 +32,7 @@ use sp_runtime::{ }; use xcm::prelude::XcmError; use xcm_runtime_apis::fees::{ - runtime_decl_for_xcm_payment_api::XcmPaymentApiV1, Error as XcmPaymentApiError, + runtime_decl_for_xcm_payment_api::XcmPaymentApiV2, Error as XcmPaymentApiError, }; type RuntimeHelper = @@ -150,7 +150,7 @@ pub fn set_storage_keys_by_governance_works( pub fn xcm_payment_api_with_native_token_works() where - Runtime: XcmPaymentApiV1 + Runtime: XcmPaymentApiV2 + frame_system::Config + pallet_balances::Config + pallet_session::Config diff --git a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs index 50ee9cee032dd..5925b02d3afd2 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs @@ -1109,7 +1109,7 @@ impl_runtime_apis! { PolkadotXcm::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { PolkadotXcm::query_delivery_fees(destination, message) } } diff --git a/polkadot/node/service/src/fake_runtime_api.rs b/polkadot/node/service/src/fake_runtime_api.rs index 4e31c72d334f7..8511b0ab1d363 100644 --- a/polkadot/node/service/src/fake_runtime_api.rs +++ b/polkadot/node/service/src/fake_runtime_api.rs @@ -443,7 +443,7 @@ sp_api::impl_runtime_apis! { unimplemented!() } - fn query_delivery_fees(_: VersionedLocation, _: VersionedXcm<()>) -> Result { + fn query_delivery_fees(_: VersionedLocation, _: VersionedXcm<()>, _: VersionedAssetId) -> Result { unimplemented!() } } diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 950723d451e2b..92daed79e1d77 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1915,7 +1915,7 @@ sp_api::impl_runtime_apis! { XcmPallet::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { XcmPallet::query_delivery_fees(destination, message) } } diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 8e8490885766e..3b2486245b22f 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -2669,7 +2669,7 @@ sp_api::impl_runtime_apis! { XcmPallet::query_xcm_weight(message) } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { XcmPallet::query_delivery_fees(destination, message) } } diff --git a/polkadot/xcm/xcm-runtime-apis/src/fees.rs b/polkadot/xcm/xcm-runtime-apis/src/fees.rs index a0e2dc912934e..cc95cbae789b3 100644 --- a/polkadot/xcm/xcm-runtime-apis/src/fees.rs +++ b/polkadot/xcm/xcm-runtime-apis/src/fees.rs @@ -34,6 +34,7 @@ sp_api::decl_runtime_apis! { /// /// To determine the execution weight of the calls required for /// [`xcm::latest::Instruction::Transact`] instruction, `TransactionPaymentCallApi` can be used. + #[api_version(2)] pub trait XcmPaymentApi { /// Returns a list of acceptable payment assets. /// @@ -58,14 +59,26 @@ sp_api::decl_runtime_apis! { fn query_weight_to_asset_fee(weight: Weight, asset: VersionedAssetId) -> Result; /// Get delivery fees for sending a specific `message` to a `destination`. - /// These always come in a specific asset, defined by the chain. + /// These always come in a specific asset, defined by the chain. Version 1 /// /// # Arguments /// * `message`: The message that'll be sent, necessary because most delivery fees are based on the /// size of the message. /// * `destination`: The destination to send the message to. Different destinations may use /// different senders that charge different fees. + #[changed_in(2)] fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result; + + /// Get delivery fees for sending a specific `message` to a `destination`. + /// These always come in a specific asset, defined by the parameter `asset`. + /// + /// # Arguments + /// * `asset`: The asset to charge fees in. + /// * `message`: The message that'll be sent, necessary because most delivery fees are based on the + /// size of the message. + /// * `destination`: The destination to send the message to. Different destinations may use + /// different senders that charge different fees. + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, asset: VersionedAssetId) -> Result; } } diff --git a/polkadot/xcm/xcm-runtime-apis/tests/fee_estimation.rs b/polkadot/xcm/xcm-runtime-apis/tests/fee_estimation.rs index c9683e0268290..76438a93224a3 100644 --- a/polkadot/xcm/xcm-runtime-apis/tests/fee_estimation.rs +++ b/polkadot/xcm/xcm-runtime-apis/tests/fee_estimation.rs @@ -143,12 +143,13 @@ fn fee_estimation_for_teleport() { // results. let weight = runtime_api.query_xcm_weight(H256::zero(), local_xcm.clone()).unwrap().unwrap(); + let versioned_asset = VersionedAssetId::from(AssetId(HereLocation::get())); assert_eq!(weight, Weight::from_parts(400, 40)); let execution_fees = runtime_api .query_weight_to_asset_fee( H256::zero(), weight, - VersionedAssetId::from(AssetId(HereLocation::get())), + versioned_asset.clone(), ) .unwrap() .unwrap(); @@ -160,7 +161,7 @@ fn fee_estimation_for_teleport() { let remote_message = &remote_messages[0]; let delivery_fees = runtime_api - .query_delivery_fees(H256::zero(), destination.clone(), remote_message.clone()) + .query_delivery_fees(H256::zero(), destination.clone(), remote_message.clone(), versioned_asset) .unwrap() .unwrap(); assert_eq!(delivery_fees, VersionedAssets::from((Here, 20u128))); diff --git a/polkadot/xcm/xcm-runtime-apis/tests/mock.rs b/polkadot/xcm/xcm-runtime-apis/tests/mock.rs index 05c5dcbbef251..480fdb957632a 100644 --- a/polkadot/xcm/xcm-runtime-apis/tests/mock.rs +++ b/polkadot/xcm/xcm-runtime-apis/tests/mock.rs @@ -497,7 +497,7 @@ sp_api::mock_impl_runtime_apis! { } } - fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { + fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, _: VersionedAssetId) -> Result { XcmPallet::query_delivery_fees(destination, message) } }