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

Use fungigbles adapter to withdraw (burn) assets and not get trapped #1088

Merged
merged 3 commits into from
Dec 16, 2021

Conversation

girazoki
Copy link
Collaborator

What does it do?

In xcm-transactor, there is one local xcm execution (to withdraw the assets that will be used for fee handling) and a remote one (where we send the transaction t the destination chain).

Currently the first local xcm execution is using WithdrawAssets, but this one is putting the assets into holding and then they get trapped by the xcm post_execution. Ideally we would use an instruction like BurnAssets, apparently coming in xcm V3, but we need to solve this issue before that.

This PR changes the way XCM transactor works and instead of burning the asset through XCM, we are burning directly. We use the AssetTransactor trait, which has a withdraw_asset function that burns the corresponding amount from the corresponding user without putting the withdrawn amount in the holding register.

What important points reviewers should know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

@girazoki girazoki added A0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Dec 16, 2021
@librelois librelois mentioned this pull request Dec 16, 2021
25 tasks
@girazoki girazoki merged commit 1085ed0 into master Dec 16, 2021
@girazoki girazoki deleted the girazoki-change-local-execution-xcm-transactor branch December 16, 2021 17:02
@notlesh notlesh added D1-audited👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited and removed D9-needsaudit👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D1-audited👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants