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.
I figured this is a better place to continue the discussion started in paritytech/polkadot-sdk#853
The idea is decouple Transact to be more generic since the current implementation of XCM expects the encoded
callto be runtime specific, the call data is a nested enum that encodes the pallet and extrinsic index which changes from one chain to another, with #22 one can query the pallet information of the remote system to avoid hard coupling among chains but to me it feels more like a not ideal workaround that introduces the extra step of first querying the chain plus the fact that pallet info is very Substrate specific, ideally we should care more about the what to execute and not its location in the other system. Does it make sense?So for this I propose the "interface identifier" which represents the what to execute regardless of where it's defined. For convenience it doesn't have to be a community maintained registry of calls but can be deterministically and statically generated by creating a hash table that maps generated interface identifiers to the appropriate extrinsic. In the linked issue I give a better example in case it's not clear.
Happy to know what people think of the approach :)