Open ianhe8x opened 3 years ago
A Detailed Example for cross chain transfer initiator Plasm, parachainId 5000 receiver Acala, parachainId 666
Plasm sent a x-token transfer at height 10003 (https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.rococo.plasmnet.io#/explorer/query/0xbf0beede832b68c3548d8eee1e99ef1bfbf6d2bcaf5117b315559276bee52e79) relayParentNumber: 79,474
Acala received and processed the message at Height 8004 (https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-1.acala.laminar.one%2Fws#/explorer/query/0x3aaa97d149441b94e044e1fb58fbb2caf353170cbd16ff8b7bdd7d0e4303d25b) relayParentNumber: 79,476
await api.query.hrmp.hrmpChannelDigests.at(await api.rpc.chain.getBlockHash(79476),666)
can see a message from parachain 5000await api.query.hrmp.hrmpChannelContents.at(await api.rpc.chain.getBlockHash(79476),{sender: 5000, receiver:666})
can retrieve message data, we should be able to compare it with the hash from Plasm @79474 event xcmHandler.HrmpMessageSent
Once X-Token is enabled in Rococo, user will allow to transfer tokens between parachain and relay chain. We can create a example to track the asset flow.
Furthermore, XCMP comes with its own events, life cycle of messages between chains is a quite interesting topic we can discuss here.