This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Conflating Filtering and Identifying in XCM v0 NetworkId
and MultiAsset
#3409
Labels
I8-refactor
Code needs refactoring.
J1-meta
A specific issue for grouping tasks or bugs of a specific category.
T6-XCM
This PR/Issue is related to XCM.
I would like to raise an issue I see with XCM v0:
I see a difference between
NetworkId
andMultiAsset
on the one hand and other enums/"identifiers" likeMultiLocation
orBodyPart
. The latter separate the identifying and filtering parts. Identifying is done by the enum instance (e.g. a multilocation might beX2(Parachain(1), GeneralIndex(42))
) while filtering is done in the XCM implementation (e.g. theIsTeleporter
filter). This IMO is a good pattern.NetworkId
andMultiAsset
combine an identifying function with a filter function within the enum which leads to non-filtering code having to manage the case when we getMultiAsset::AllFungible
even though that is not its purpose. I think we should avoid this in v1 and separate filtering and identifying completely.The text was updated successfully, but these errors were encountered: