-
Notifications
You must be signed in to change notification settings - Fork 840
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
Support different assets for delivery fees #4375
Closed
Closed
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
eea690b
feat(xcm-executor): add AssetConverter config item to support multipl…
franciscoaguirre 5d74482
fix: implement AssetConverter in all runtimes
franciscoaguirre 8e9df56
feat: add AssetConverters copying the traders
franciscoaguirre 3ed0430
test(asset-hub-westend): add tests for paying delivery fees with diff…
franciscoaguirre da83c68
fix: update lock
franciscoaguirre efab825
fix(pallet-xcm): remove jit withdrawal to allow paying delivery fees …
franciscoaguirre da7b054
doc: add TODOs I'm considering
franciscoaguirre bdfbeaf
feat: start with SwapAssetConverter
franciscoaguirre a81ba18
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre c69095f
feat: SwapAssetConverter. Some tests failing
franciscoaguirre 0193e60
fix(asset-hub-rococo-integration-tests): delivery fee taken from holding
franciscoaguirre 0b0437c
fix(integration-tests): stick to jit withdrawal for now
franciscoaguirre 03c01ff
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre 502ebf6
chore: update Cargo.lock
franciscoaguirre 550d92a
fix: fmt
franciscoaguirre ba024d1
feat(xcm-executor): remove all logic regarding local execution
franciscoaguirre 69d1043
feat: complete tests
franciscoaguirre 820160e
fix: fmt
franciscoaguirre 677129d
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre 99c9749
feat: remove support for sufficient asset converters
franciscoaguirre 05b620d
feat(asset-hub-rococo): add a PoolAssetsConverter
franciscoaguirre 522e7c7
feat(emulated-tests): add USDT to genesis and create WND<>USDT pool i…
franciscoaguirre 629dcce
doc: prdoc
franciscoaguirre b6f3b6e
doc(asset-hub-westend-integration-tests): change the docs for a test
franciscoaguirre 7ffd02a
chore(xcm-executor): change order of associated types in config
franciscoaguirre 69c22ce
fix: fmt
franciscoaguirre b485475
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre df196fe
feat: remove AssetConverter and use AssetExchanger instead
franciscoaguirre 1639489
doc: prdoc
franciscoaguirre 9875ee2
doc: prdoc
franciscoaguirre c3d1554
fix: clippy and feedback
franciscoaguirre ab890aa
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre e2107f8
fix: zepter and taplo
franciscoaguirre 84d0f14
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre 77b0cc8
feat(xcm-executor): not error in case there are no delivery fees
franciscoaguirre 2888826
chore(xcm-executor): deduplicate swapping logic in take_fees
franciscoaguirre 90807aa
fix(assets-common): remove duplicated feature flags
franciscoaguirre 10dd60f
chore(xcm-executor): remove default implementation for AssetExchange
franciscoaguirre 49d76b9
doc: update prdoc crate bumps
franciscoaguirre a2d3b68
Apply suggestions from code review
acatangiu d4d6055
fix executor
acatangiu 8f266c4
clean up tests
acatangiu 11a03ee
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre b0e1c60
chore: address some docs and naming feedback
franciscoaguirre 18e8b7c
fix(staging-xcm-executor): move log to tracing
franciscoaguirre d1baffc
chore: address more feedback
franciscoaguirre 28553fb
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre d576a76
fix: fmt
franciscoaguirre 1605b8a
Merge branch 'master' into different-assets-delivery-fees
franciscoaguirre 5e1c999
fix: fmt
franciscoaguirre 1fe6c08
feat(xcm-builder): rename FungiblesPoolAdapter to SingleAssetExchange…
franciscoaguirre 184b2eb
feat(xcm-builder): tests for SingleAssetExchangeAdapter
franciscoaguirre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore(xcm-executor): remove default implementation for AssetExchange
- Loading branch information
commit 10dd60fc0c6b0f675cac903a84ecbc3e67a56398
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API is not clear to me. Exact asset1 for asset2, asset1 for exact asset2? if first for example, what the fungibility amount of asset2 implies in this case? Also should new function be more symmetric with above function, where it accepts in and out assets as a collection of assets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense to accept collections of assets here.
The API was meant to mimic the
QuotePrice
trait, but usingmaximal: bool
to distinguish the two cases.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think the non-symmetricity with
exchange_asset
makes it difficult to use in more general cases.Let's say you want to quote the price for 2 assets, from 2 other assets, to later call
exchange_asset
(a more general case than the current PR). Then there is no way to use thisquote_exchange_price
to get the expected requirement forgive
to get a successful execution ofexchange_asset
.maybe something like this could be better
Note that we could also support non-fungibles with a more complex
give
parameter maybe.I'm not sure if we should also give the
Option<Location>
informationThen the tuple implementation would just be:
To avoid allocations we could put this vector in parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it depends on whether we want to keep the structure of
Assets
or limit it to only one asset at a time. UsingAssets
is more flexible, as we allow implementations to do more things. This adapter only takes the first asset for exchanging, but it's only of many.Anyway, I decided to split this PR into two, one containing only the adapter and the additional quote method, the other one containing the tweaks to the executor using the
AssetExchanger
.We can keep this discussion going on the PR for the adapter.