Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

XcmPaymentApi::query_delivery_fees() should allow querying fee using custom asset #7061

Open
acatangiu opened this issue Jan 6, 2025 · 3 comments
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. T6-XCM This PR/Issue is related to XCM.

Comments

@acatangiu
Copy link
Contributor

The current XcmPaymentApi::query_delivery_fees() strictly returns fee required in native assets.

fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result<VersionedAssets, Error>;

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>;
@acatangiu
Copy link
Contributor Author

cc @franciscoaguirre @x3c41a

@acatangiu acatangiu added T6-XCM This PR/Issue is related to XCM. C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. labels Jan 6, 2025
@programskillforverification
Copy link
Contributor

I would like to take this one

@acatangiu
Copy link
Contributor Author

I would like to take this one

yes, please do. we're here to help if you have any further questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. T6-XCM This PR/Issue is related to XCM.
Projects
Status: No status
Development

No branches or pull requests

2 participants