-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Confusing documentation for xcm ConcrateFungible #2547
Comments
Sender's point of view. https://github.com/paritytech/polkadot/blob/master/xcm/xcm-executor/src/assets.rs#L30 |
@xlc Thanks. I also think it makes sense because that's how we were using it before. However the comments in the I guess the intention of the comments is like below, but we need the confirmation from polkadot team:
|
@h4x3rotab pallet xcm-handle in cumulus repo actually do nothing but help to wrap XCM message to HRMP message and impl **DownwardMessageHandler/HrmpMessageHandler **. Only XCM message itself and xcm-executor are real components of XCM system. So i think xcm-exector should be the only component that executes XCM and decide where to send them to. However some logic within xcm-handler acts as a XCM router, that's a little bit confuse |
@h4x3rotab IMO there is no problem in documentation. My understanding is that in your Understanding 1, the XCM message with In comparison, if the sending parachain doesn't send XCM to itself, but sends it to receiver directly, the message would be a different one: obviously there would be no So as we see above, messages are different based on whom it is sent to. In both cases the relative path is the point view of receivers. Additionally, in scenario 1, |
As pointed out here:
It clearly said the XCM should be interpreted from the receiver's point of view. Does it mean the sender should construct the XCM in a way that the asset MultiLocation should be related to the receiver, or to the sender?
Let me take an example. If I'm at Acala parachain, and want to send 10 ACA to Phala parachain back and forth. I will need to construct two different messages
DepositReserveAsset
on the Acala side, andInitiateReserveWithdraw
on the Phala side. The following are the two different understanding. Please advise which one is correct.Understanding 1: AssetId is constructed from sender's point of view
We tried this with the default
xcm-executor
,xcm-handler
provided by Cumulus, and this construction worked. However by definition it's conflicted with the description from the XCM documentations.Understanding 2: AssetId is constructed from receivers's point of view
(Not tried yet)
The text was updated successfully, but these errors were encountered: