This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
[xcm] ConvertedConcreteId
convert to MultiAsset (fungible) back-and-forth
#6760
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.
related to the #6777
Context:
We started on work on runtime
FungiblesApi
to query all fungible assets from runtime for better UX/UI experience.This API could be used by all runtimes.
So in this first iteration we have api (Basti suggests to have it in Cumulus):
In Cumulus:
https://github.com/paritytech/cumulus/pull/2180/files#diff-5739a90b109dd72bff24e5e1d8a1e7854fb56fcd62d7174fcc6d838f495f52f0R34-R39
Or Polkadot:
https://github.com/paritytech/polkadot/pull/6777/files#diff-df0fea42045207170f8b159d2640ccfcd00da630bd57f38a2cca8a9ee79f698bR37-R42
So, in Cumulus for Statemine/Statemint/Westmint we have implementation, which reads account balances from
pallet_balances
and from multiple instances ofpallet_assets
.For
pallet_assets
we useConvertedConreteId
, which is going to be replaced byMatchedConvertedConcreteId
, when this PR is merged.So, the idea behind this PR, is that
ConvertedConreteId/MatchedConvertedConcreteId
does conversion fromMultiAsset->(AssetId, Balance)
, and it would be very useful, if it does the backwards also(AssetId, Balance)->MultiAsset
to minimalize adding new code/custom conversions like this in every (Cumulus or whatever (para)chain) runtime.