`XcmPaymentApi::query_delivery_fees()` should allow querying fee using custom asset
The current XcmPaymentApi::query_delivery_fees() strictly returns fee required in native assets.
https://github.com/paritytech/polkadot-sdk/blob/568231a9a85d94954c002532a0f4351a3bb59e83/polkadot/xcm/xcm-runtime-apis/src/fees.rs#L68
But the delivery fee can also be paid using assets other than native.
I suggest enhancing the API with an optional asset specifier so that users/dapps can directly query the fee in their desired asset:
- fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result<VersionedAssets, Error>;
+ fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, asset: Option<VersionedAssetId>) -> Result<VersionedAssets, Error>;
or to be aligned with XcmPaymentApi::query_weight_to_asset_fee()
- fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result<VersionedAssets, Error>;
+ fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>, asset: VersionedAssetId) -> Result<u128, Error>;
cc @franciscoaguirre @x3c41a
I would like to take this one
I would like to take this one
yes, please do. we're here to help if you have any further questions