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

Add assets in pool with native to query_acceptable_payment_assets's return #5599

Merged
merged 10 commits into from
Oct 15, 2024

Conversation

franciscoaguirre
Copy link
Contributor

XcmPaymentApi::query_acceptable_payment_assets is an API that returns the assets that can be used to pay fees on the runtime where it's called.
For relays and most system chains this was configured only as the native asset: ROC and WND.
However, the asset hubs have the asset conversion pallet, which allows fees to be paid in any asset in a pool with the native one.
This PR adds the list of assets in a pool with the native one to the return value of this API for the asset hubs.

@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Sep 5, 2024
@franciscoaguirre franciscoaguirre added the A4-needs-backport Pull request must be backported to all maintained releases. label Sep 5, 2024
@bkontur bkontur added this pull request to the merge queue Oct 15, 2024
Merged via the queue into master with commit d2ba567 Oct 15, 2024
194 of 195 checks passed
@bkontur bkontur deleted the return-multiple-fee-assets branch October 15, 2024 12:26
github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
…eturn (#5599)

`XcmPaymentApi::query_acceptable_payment_assets` is an API that returns
the assets that can be used to pay fees on the runtime where it's
called.
For relays and most system chains this was configured only as the native
asset: ROC and WND.
However, the asset hubs have the asset conversion pallet, which allows
fees to be paid in any asset in a pool with the native one.
This PR adds the list of assets in a pool with the native one to the
return value of this API for the asset hubs.

---------

Co-authored-by: Branislav Kontur <[email protected]>
(cherry picked from commit d2ba567)
@paritytech-cmd-bot-polkadot-sdk

Successfully created backport PR for stable2407:

github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
…eturn (#5599)

`XcmPaymentApi::query_acceptable_payment_assets` is an API that returns
the assets that can be used to pay fees on the runtime where it's
called.
For relays and most system chains this was configured only as the native
asset: ROC and WND.
However, the asset hubs have the asset conversion pallet, which allows
fees to be paid in any asset in a pool with the native one.
This PR adds the list of assets in a pool with the native one to the
return value of this API for the asset hubs.

---------

Co-authored-by: Branislav Kontur <[email protected]>
(cherry picked from commit d2ba567)
@paritytech-cmd-bot-polkadot-sdk

Successfully created backport PR for stable2409:

franciscoaguirre added a commit that referenced this pull request Oct 15, 2024
Backport #5599 into `stable2409` from franciscoaguirre.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

---------

Co-authored-by: Francisco Aguirre <[email protected]>
@mrshiposha
Copy link
Contributor

@franciscoaguirre, do you plan to adjust the implementation of the query_weight_to_asset_fee so it can calculate the current price in the selected currency using pools?

@franciscoaguirre
Copy link
Contributor Author

Yes, coming right up!

@franciscoaguirre
Copy link
Contributor Author

franciscoaguirre commented Oct 15, 2024

Wrote a draft: #6080

github-merge-queue bot pushed a commit that referenced this pull request Oct 22, 2024
…#6080)

A follow-up to #5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
…paritytech#6080)

A follow-up to paritytech#5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
…paritytech#6080)

A follow-up to paritytech#5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
…paritytech#6080)

A follow-up to paritytech#5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
…paritytech#6080)

A follow-up to paritytech#5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
franciscoaguirre added a commit that referenced this pull request Oct 25, 2024
Backport #5599 into `stable2407` from franciscoaguirre.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

---------

Co-authored-by: Francisco Aguirre <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: Shawn Tabrizi <[email protected]>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 25, 2024
…paritytech#6080)

A follow-up to paritytech#5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 29, 2024
…paritytech#6080)

A follow-up to paritytech#5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
mordamax pushed a commit to paritytech-stg/polkadot-sdk that referenced this pull request Oct 29, 2024
…paritytech#6080)

A follow-up to paritytech#5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
franciscoaguirre added a commit that referenced this pull request Nov 6, 2024
…#6080)

A follow-up to #5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
(cherry picked from commit b4732ad)
franciscoaguirre added a commit that referenced this pull request Nov 8, 2024
…#6080)

A follow-up to #5599.
Assets in a pool with the native one are returned from
`query_acceptable_payment_assets`. Now those assets can be used in
`query_weight_to_asset_fee` to get the correct amount that needs to be
paid.

---------

Co-authored-by: command-bot <>
(cherry picked from commit b4732ad)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A4-needs-backport Pull request must be backported to all maintained releases. T6-XCM This PR/Issue is related to XCM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants