A cross chain transfer generates several extrinsics depending on the number of hops. In this example: https://kusama.subscan.io/xcm_message/kusama-3c38ab02a51980022f63af373d4cad977cb9405b
we have a UMP transfer from Mangata to Kusama.
I'd like to be able to parse extrinsics just on the final destination (Kusama in this case) and pick up any KSM transfers happening cross chain (which are not happening with the regular transfer events).
The extrinsic on Kusama has a bunch of events but I'm not understanding how I should parse these to detect the transfer, transfer amount and generally any information.
When reading about XCM there's a lot of documentation explaining how to construct transactions which make up the first extrinsic but then the following extrinsics and events in the other chains seem more cryptic. If someone could point me in the right direction I would greatly appreciate
Adding to @Bruno's comment:
+1 for the subscan XCM dashboard links. when searching for an XCM transfer hash on Subscan, it’s able to find a result and it links all the extrinsics across all the chains that were involved in the transfer. As far as I can see, it looks like Subscan is creating its own index after parsing all the blocks and somehow obtaining the XCM Transfer hash for each extrinsic involved. In the example above the XCM Transfer hash is part of the data on the destination chain block (the messageId: 0x3d3c511af2510f48be09d17bc3ff8897e79c95f850215931e8e42c2a50789ede) but it’s not present anywhere in the originator chain block. How is the XCM Transfer hash derived?
To build something like the dashboard here: https://kusama.subscan.io/xcm_dashboard is there a way to query the chain for XCM transfers specifically or is Subscan parsing and indexing all blocks across all chains for XCM transfers and then linking together and making that information queryable?