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

transfer function Preservation is changed to Expendable #7243

Conversation

dhirajs0
Copy link
Contributor

Description

Fixes #7039

The Preservation of transfer method of fungible and fungibles adapters is changed from Preserve to Expendable. So the behavior of the TransferAsset will be consistent with the WithdrawAsset function, as in fungible and fungibles adapter.

This pull request includes changes to the fungible_adapter.rs and fungibles_adapter.rs files in the polkadot/xcm/xcm-builder directory. The main change involves modifying the transfer method to use the Expendable strategy instead of the Preserve strategy.

Changes to transfer strategy:

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Jan 19, 2025

User @dhirajs0, please sign the CLA here.

@dhirajs0 dhirajs0 marked this pull request as ready for review January 19, 2025 17:13
@dhirajs0 dhirajs0 requested a review from a team as a code owner January 19, 2025 17:13
prdoc/pr_7243.prdoc Show resolved Hide resolved
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Copy link
Contributor

Review required! Latest push from author must always be reviewed

@acatangiu acatangiu requested a review from a team January 31, 2025 08:19
@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Jan 31, 2025
@franciscoaguirre
Copy link
Contributor

@dhirajs0 You have some clippy warnings. You can check them out in the CI jobs that failed in order to fix them

@dhirajs0
Copy link
Contributor Author

dhirajs0 commented Feb 1, 2025

@franciscoaguirre I have fixed the cause of the clippy warnings.

@raymondkfcheung
Copy link

/cmd fmt

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Command "fit" has started 🚀 See logs here

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Command "fit" has failed ❌! See logs here

@dhirajs0
Copy link
Contributor Author

dhirajs0 commented Feb 6, 2025

@franciscoaguirre
I have formatted the code. So, the test relating to fmt will pass now.
There few test that may still fail:

  1. Lychee link checker : It is calling the old links to substrate docs which are no longer valid are like https://docs.substrate.io/install/ and related links.
  2. parity-publish --color always plan --skip-check --prdoc prdoc/ was also failing.

prdoc/pr_7243.prdoc Outdated Show resolved Hide resolved
Co-authored-by: Adrian Catangiu <adrian@parity.io>
auto-merge was automatically disabled February 10, 2025 11:04

Head branch was pushed to by a user without write access

@acatangiu acatangiu added the A4-needs-backport Pull request must be backported to all maintained releases. label Feb 10, 2025
@franciscoaguirre franciscoaguirre added this pull request to the merge queue Feb 10, 2025
Merged via the queue into paritytech:master with commit f96da6f Feb 10, 2025
231 of 274 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 10, 2025
# Description

Fixes #7039

The Preservation of transfer method of fungible and fungibles adapters
is changed from Preserve to Expendable. So the behavior of the
TransferAsset will be consistent with the WithdrawAsset function, as in
[fungible](https://github.com/paritytech/polkadot-sdk/blob/f3ab3854e1df9e0498599f01ba4f9f152426432a/polkadot/xcm/xcm-builder/src/fungible_adapter.rs#L217)
and [fungibles](https://github.com/paritytech/polkadot-sdk/issues/url)
adapter.

This pull request includes changes to the `fungible_adapter.rs` and
`fungibles_adapter.rs` files in the `polkadot/xcm/xcm-builder`
directory. The main change involves modifying the transfer method to use
the `Expendable` strategy instead of the `Preserve` strategy.

Changes to transfer strategy:

*
[`polkadot/xcm/xcm-builder/src/fungible_adapter.rs`](diffhunk://#diff-6ebd77385441f2c8b023c480e818a01c4b43ae892c73ca30144cd64ee960bd66L67-R67):
Changed the transfer method to use `Expendable` instead of `Preserve`.
*
[`polkadot/xcm/xcm-builder/src/fungibles_adapter.rs`](diffhunk://#diff-82221429de4c4c88be3d2976ece6475ef4fa56a32abc70290911bd47191f8e17L61-R61):
Changed the transfer method to use `Expendable` instead of `Preserve`.

---------

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
(cherry picked from commit f96da6f)
@paritytech-cmd-bot-polkadot-sdk

Successfully created backport PR for stable2407:

github-actions bot pushed a commit that referenced this pull request Feb 10, 2025
# Description

Fixes #7039

The Preservation of transfer method of fungible and fungibles adapters
is changed from Preserve to Expendable. So the behavior of the
TransferAsset will be consistent with the WithdrawAsset function, as in
[fungible](https://github.com/paritytech/polkadot-sdk/blob/f3ab3854e1df9e0498599f01ba4f9f152426432a/polkadot/xcm/xcm-builder/src/fungible_adapter.rs#L217)
and [fungibles](https://github.com/paritytech/polkadot-sdk/issues/url)
adapter.

This pull request includes changes to the `fungible_adapter.rs` and
`fungibles_adapter.rs` files in the `polkadot/xcm/xcm-builder`
directory. The main change involves modifying the transfer method to use
the `Expendable` strategy instead of the `Preserve` strategy.

Changes to transfer strategy:

*
[`polkadot/xcm/xcm-builder/src/fungible_adapter.rs`](diffhunk://#diff-6ebd77385441f2c8b023c480e818a01c4b43ae892c73ca30144cd64ee960bd66L67-R67):
Changed the transfer method to use `Expendable` instead of `Preserve`.
*
[`polkadot/xcm/xcm-builder/src/fungibles_adapter.rs`](diffhunk://#diff-82221429de4c4c88be3d2976ece6475ef4fa56a32abc70290911bd47191f8e17L61-R61):
Changed the transfer method to use `Expendable` instead of `Preserve`.

---------

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
(cherry picked from commit f96da6f)
@paritytech-cmd-bot-polkadot-sdk

Successfully created backport PR for stable2409:

github-actions bot pushed a commit that referenced this pull request Feb 10, 2025
# Description

Fixes #7039

The Preservation of transfer method of fungible and fungibles adapters
is changed from Preserve to Expendable. So the behavior of the
TransferAsset will be consistent with the WithdrawAsset function, as in
[fungible](https://github.com/paritytech/polkadot-sdk/blob/f3ab3854e1df9e0498599f01ba4f9f152426432a/polkadot/xcm/xcm-builder/src/fungible_adapter.rs#L217)
and [fungibles](https://github.com/paritytech/polkadot-sdk/issues/url)
adapter.

This pull request includes changes to the `fungible_adapter.rs` and
`fungibles_adapter.rs` files in the `polkadot/xcm/xcm-builder`
directory. The main change involves modifying the transfer method to use
the `Expendable` strategy instead of the `Preserve` strategy.

Changes to transfer strategy:

*
[`polkadot/xcm/xcm-builder/src/fungible_adapter.rs`](diffhunk://#diff-6ebd77385441f2c8b023c480e818a01c4b43ae892c73ca30144cd64ee960bd66L67-R67):
Changed the transfer method to use `Expendable` instead of `Preserve`.
*
[`polkadot/xcm/xcm-builder/src/fungibles_adapter.rs`](diffhunk://#diff-82221429de4c4c88be3d2976ece6475ef4fa56a32abc70290911bd47191f8e17L61-R61):
Changed the transfer method to use `Expendable` instead of `Preserve`.

---------

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
(cherry picked from commit f96da6f)
@paritytech-cmd-bot-polkadot-sdk

Successfully created backport PR for stable2412:

EgorPopelyaev pushed a commit that referenced this pull request Feb 11, 2025
Backport #7243 into `stable2409` from dhirajs0.

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: Dhiraj Sah <dhiraj.kumar2990@gmail.com>
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.

Fungible and fungibles adapters should allow account death like burns and mints
7 participants