Skip to content

Conversation

@dmoka
Copy link
Contributor

@dmoka dmoka commented Jul 13, 2023

Description

Implementing the handling of ExchanceAsset xcm instruction

Adding custom XcmExecuteFilter to allow Transfer-And-Swap functionality and filter out non-desired xcm messages.

NOTE: The filter and exchange asset won't be configured for now in hydra runtime. First we want to enable this in basilisk to test it out.

Leftover TODOs:

  • integration test for transfer and swap including 4 hops
  • clippy and version updates

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Patch coverage: 84.69% and project coverage change: +0.19% 🎉

Comparison is base (809d38e) 64.81% compared to head (0bfa9a9) 65.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #640      +/-   ##
==========================================
+ Coverage   64.81%   65.01%   +0.19%     
==========================================
  Files         135      137       +2     
  Lines        9800     9898      +98     
==========================================
+ Hits         6352     6435      +83     
- Misses       3448     3463      +15     
Files Changed Coverage Δ
runtime/adapters/src/lib.rs 73.64% <ø> (ø)
runtime/adapters/src/xcm_execute_filter.rs 71.87% <71.87%> (ø)
runtime/adapters/src/xcm_exchange.rs 90.90% <90.90%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@enthusiastmartin enthusiastmartin left a comment

Choose a reason for hiding this comment

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

looks good to me. just some minor suggestions.

@enthusiastmartin
Copy link
Member

lgtm.

although , one question : how this is integrated into runtime ? i see no changes in the runtime xcm config but there are already integration tests.

Copy link
Contributor

@apopiak apopiak left a comment

Choose a reason for hiding this comment

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

seems like we don't need to redefine the parameter, no?

@apopiak
Copy link
Contributor

apopiak commented Jul 27, 2023

lgtm.

although , one question : how this is integrated into runtime ? i see no changes in the runtime xcm config but there are already integration tests.

It's not yet. Going to basilisk first (see galacticcouncil/Basilisk-node#639). Integration will look very similar.

@enthusiastmartin
Copy link
Member

lgtm.

altough , one question : how this is integrated into runtime ? i see no changes in the runtime xcm config

seems like we don't need to redefine the parameter, no?

not sure what you mean. but assetexchange in xcm config is () in the master branch.

i thought this was the one taking care of it.

@apopiak
Copy link
Contributor

apopiak commented Jul 27, 2023

This is the implementation, but we want to test on Basilisk first, so it doesn't actually add it to the runtime, yet. I Imagine it will be a two step process with another PR. Same pattern as XCM rate limiter.

@apopiak
Copy link
Contributor

apopiak commented Jul 27, 2023

seems like we don't need to redefine the parameter, no?

this was about the particular review comments I left about implementation details, don't worry about it.

@enthusiastmartin
Copy link
Member

This is the implementation, but we want to test on Basilisk first, so it doesn't actually add it to the runtime, yet. I Imagine it will be a two step process with another PR. Same pattern as XCM rate limiter.

ah right. makes sense. but still wondering how the integration tests work as it is not integrated.

@mrq1911 mrq1911 changed the title feat: exchange asset feat: XCM exchange asset Jul 27, 2023
@mrq1911 mrq1911 merged commit 24823f0 into master Jul 28, 2023
@jak-pan jak-pan deleted the hack/xcm-exchange-asset branch February 22, 2024 10:47
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.

5 participants