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

feat: xcm exchange asset #714

Merged
merged 12 commits into from
Feb 27, 2024
Merged

feat: xcm exchange asset #714

merged 12 commits into from
Feb 27, 2024

Conversation

dmoka
Copy link
Contributor

@dmoka dmoka commented Dec 8, 2023

Description

We enable AssetExchange xcm message instruction in hydra.

It also means that we needed to change the XcmFilter of pallet_xcm from Nothing to AllowTransferAndSwap, which is a more permissive in terms of allowed xcm instructions.

Related Issue

Motivation and Context

How Has This Been Tested?

Checklist:

  • I have updated the documentation if necessary.
  • I have added tests to cover my changes, regression test if fixing an issue.
  • This is a breaking change.

Copy link

github-actions bot commented Dec 8, 2023

Crate versions that have been updated:

  • runtime-integration-tests: v1.19.2 -> v1.19.3
  • hydradx-runtime: v216.0.0 -> v217.0.0

Runtime version has been increased.

@mrq1911 mrq1911 changed the title feat: add xcm exchange asset feat: xcm exchange asset Dec 19, 2023
@@ -210,7 +216,7 @@ impl pallet_xcm::Config for Runtime {
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
type XcmRouter = XcmRouter;
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
type XcmExecuteFilter = Nothing;
type XcmExecuteFilter = AllowTransferAndSwap<MaxXcmDepth, MaxNumberOfInstructions, RuntimeCall>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this change necessary? i dont think we are planning to execute xcm messages locally and xcm::execute extrinsic is call filtered anyway currently

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want it in combination with changing the call filter to allow UIs to interact with the chain through pallet_xcm::execute. This is part of the XCM exchange asset stuff.
Concretely you could imagine our UI swapping tokens on Hydra and then sending them to the destination in one extrinsic/with one XCM.

Copy link
Member

@mrq1911 mrq1911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you try to exchange something from some sibling parachain using chopstics?

Copy link
Contributor

@jak-pan jak-pan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any problems with this?

@mrq1911 mrq1911 merged commit 5b62edf into master Feb 27, 2024
4 checks passed
@Roznovjak Roznovjak deleted the feat/add-xcm-exchange-asset branch March 12, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants