# Best Resources to Learn XCM (Tech & High Level)

**URL:** <https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192>\
**Category:** Tech Talk\
**Tags:** xcm\
**Created:** [August 27, 2022, 4:31pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192 "2022-08-27T16:31:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawntabrizi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/shawntabrizi/32/14_2.png) [@shawntabrizi](https://forum.polkadot.network/u/shawntabrizi)\
**Post date:** [August 27, 2022, 4:31pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/1 "2022-08-27T16:31:27Z")

</div>

Let’s use this thread to collect some of the best resources available in the community to get up to speed on XCM, both from a technical / development perspective, and from a non-technical / high level perspective.

Discussion welcome, especially if there are suggestions for new material and resources which does not yet exist.

## Technical Resources

- [GitHub - polkadot-fellows/xcm-format: Polkadot Cross Consensus-system Message format.](https://github.com/paritytech/xcm-format)  
The XCM format specification. The best starting point for understanding the XCM API at a technical level.

- [https://www.youtube.com/watch?v=5cgq5jOZx9g](https://www.youtube.com/watch?v=5cgq5jOZx9g)  
Code focused workshop on how XCM v1 works, and the core concepts of XCM.

- [https://www.youtube.com/watch?v=UfxU3hUprKo](https://www.youtube.com/watch?v=UfxU3hUprKo)  
Live presentation and demo of XCM over XCMP.

- [https://www.youtube.com/watch?v=cS8GvPGMLS0](https://www.youtube.com/watch?v=cS8GvPGMLS0)  
A presentation which covers some of the basic building blocks of XCM and reviews benchmarking of XCM.

## Non-Technical Resources

- [https://www.youtube.com/watch?v=2tmspefsygQ](https://www.youtube.com/watch?v=2tmspefsygQ)  
High level overview which should answer “What is XCM?”

- [https://youtu.be/K2c6xrCoQOU?t=1196](https://youtu.be/K2c6xrCoQOU?t=1196)  
High level overview of XCM and specifically the new features available in XCM v3

My list is a little biased, based on the resources we have created at Parity, but looking forward to see your contributions too.

---

<div class="post-metadata">

**Author:** ![IkerParity](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/ikerparity/32/88_2.png) [@IkerParity](https://forum.polkadot.network/u/IkerParity)\
**Post date:** [August 28, 2022, 10:50am UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/2 "2022-08-28T10:50:48Z")

</div>

On a tech level, the audit report by Quarkslab is a very good and detailed reference for XCM v2:

> **[21-12-908-REP.pdf](https://blog.quarkslab.com/resources/2022-02-27-xcmv2-audit/21-12-908-REP.pdf)**
>
> 898.05 KB

---

<div class="post-metadata">

**Author:** ![tolak](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/tolak/32/1132_2.png) [@tolak](https://forum.polkadot.network/u/tolak)\
**Post date:** [August 30, 2022, 3:49am UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/3 "2022-08-30T03:49:03Z")

</div>

This is super good 💯

---

<div class="post-metadata">

**Author:** ![ricardo](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/ricardo/32/1092_2.png) [@ricardo](https://forum.polkadot.network/u/ricardo)\
**Post date:** [August 31, 2022, 7:37am UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/4 "2022-08-31T07:37:22Z")

</div>

Another good one for XCM assets.  
[Keith Yeung, How can I transfer assets using XCM? - Substrate StackExchange](https://substrate.stackexchange.com/questions/37/how-can-i-transfer-assets-using-xcm)

---

<div class="post-metadata">

**Author:** ![gate](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/gate/32/1607_2.png) [@gate](https://forum.polkadot.network/u/gate)\
**Post date:** [January 21, 2023, 7:31pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/5 "2023-01-21T19:31:13Z")

</div>

This is useful:

> **[Cross-Consensus Message Format (XCM) · Polkadot Wiki](https://wiki.polkadot.network/docs/learn-xcm)**
>
> Learn about the messaging format at the forefront of interoperability.

---

<div class="post-metadata">

**Author:** ![gautam](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/gautam/32/8455_2.png) [@gautam](https://forum.polkadot.network/u/gautam)\
**Post date:** [January 26, 2023, 8:10pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/6 "2023-01-26T20:10:20Z")

</div>

Adding one more here, XCM demo session by @stiiifff and @hectorb from the last Sub0 - [Parity Technologies: Trappist: Thinking cross chain applications with XCM | Sub0 2022 - YouTube](https://www.youtube.com/watch?v=1eJwzbtqZYs)

Pretty cool from a application builders’ perspective.

---

<div class="post-metadata">

**Author:** ![jonathan](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/jonathan/32/129_2.png) [@jonathan](https://forum.polkadot.network/u/jonathan)\
**Post date:** [January 27, 2023, 7:05am UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/7 "2023-01-27T07:05:51Z")

</div>

The 3-part series of blog posts by Gav in '21 are also a good place to start:

1. [XCM: The Cross-Consensus Message Format](https://medium.com/polkadot-network/xcm-the-cross-consensus-message-format-3b77b1373392)
2. [XCM Part II: Versioning and Compatibility](https://medium.com/polkadot-network/xcm-part-ii-versioning-and-compatibility-b313fc257b83)
3. [XCM Part III: Execution and Error Management](https://medium.com/polkadot-network/xcm-part-iii-execution-and-error-management-ceb8155dd166)

---

<div class="post-metadata">

**Author:** ![shawntabrizi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/shawntabrizi/32/14_2.png) [@shawntabrizi](https://forum.polkadot.network/u/shawntabrizi)\
**Post date:** [February 8, 2023, 3:54pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/8 "2023-02-08T15:54:45Z")

</div>

For those that want to get even deeper into the code and try things out regarding the latest in XCM, looking at the XCM simulator is probably the best way to get your hands dirty.

[[polkadot/lib.rs at d528437edd3f966571748a7a0c8f47f9954d1ec4 · paritytech/polkadot · GitHub](https://github.com/paritytech/polkadot/blob/d528437edd3f966571748a7a0c8f47f9954d1ec4/xcm/xcm-simulator/example/src/lib.rs)]

You can check out the tests and raw XCM instructions there, and play with things yourself! For example:

```rust
	/// Scenario:
	/// The relay-chain teleports an NFT to a parachain.
	///
	/// Asserts that the parachain accounts are updated as expected.
	#[test]
	fn teleport_nft() {
		MockNet::reset();

		Relay::execute_with(|| {
			// Mint the NFT (1, 69) and give it to our "parachain#1 alias".
			assert_ok!(relay_chain::Uniques::mint(
				relay_chain::RuntimeOrigin::signed(ALICE),
				1,
				69,
				child_account_account_id(1, ALICE),
			));
			// The parachain#1 alias of Alice is what must hold it on the Relay-chain for it to be
			// withdrawable by Alice on the parachain.
			assert_eq!(
				relay_chain::Uniques::owner(1, 69),
				Some(child_account_account_id(1, ALICE))
			);
		});
		ParaA::execute_with(|| {
			assert_ok!(parachain::ForeignUniques::force_create(
				parachain::RuntimeOrigin::root(),
				(Parent, GeneralIndex(1)).into(),
				ALICE,
				false,
			));
			assert_eq!(
				parachain::ForeignUniques::owner((Parent, GeneralIndex(1)).into(), 69u32.into()),
				None,
			);
			assert_eq!(parachain::Balances::reserved_balance(&ALICE), 0);

			// IRL Alice would probably just execute this locally on the Relay-chain, but we can't
			// easily do that here since we only send between chains.
			let message = Xcm(vec![
				WithdrawAsset((GeneralIndex(1), 69u32).into()),
				InitiateTeleport {
					assets: AllCounted(1).into(),
					dest: Parachain(1).into(),
					xcm: Xcm(vec![DepositAsset {
						assets: AllCounted(1).into(),
						beneficiary: (AccountId32 { id: ALICE.into(), network: None },).into(),
					}]),
				},
			]);
			// Send teleport
			let alice = AccountId32 { id: ALICE.into(), network: None };
			assert_ok!(ParachainPalletXcm::send_xcm(alice, Parent, message));
		});
		ParaA::execute_with(|| {
			assert_eq!(
				parachain::ForeignUniques::owner((Parent, GeneralIndex(1)).into(), 69u32.into()),
				Some(ALICE),
			);
			assert_eq!(parachain::Balances::reserved_balance(&ALICE), 1000);
		});
		Relay::execute_with(|| {
			assert_eq!(relay_chain::Uniques::owner(1, 69), None);
		});
	}

```

You can execute it by cloning Polkadot and running:

```auto
cargo test -p xcm-simulator-example

```

---

<div class="post-metadata">

**Author:** ![bader](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/bader/32/2291_2.png) [@bader](https://forum.polkadot.network/u/bader)\
**Post date:** [February 13, 2023, 2:01pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/9 "2023-02-13T14:01:39Z")

</div>

A really nice resource on the finer details of XCM and how it’s configured, along with a deep dive on the pallet - super useful on getting a more hands-on look at how XCM is implemented (kudos @bernardoaraujor):

[![](https://europe1.discourse-cdn.com/flex005/uploads/polkadot2/original/2X/3/3928e828e2759f205ab6b857efd76def92e04d5d.jpeg "XCM Config & Pallet-XCM | Polkadot Deep Dives") ](https://www.youtube.com/watch?v=bFMvWmU1pYI)

---

<div class="post-metadata">

**Author:** ![Matt\_Web3](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/matt_web3/32/1285_2.png) [@Matt\_Web3](https://forum.polkadot.network/u/Matt_Web3)\
**Post date:** [February 14, 2023, 5:22am UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/10 "2023-02-14T05:22:57Z")

</div>

Great resources guys! Thank you, it will help to better understanding and easier to onboard people! Can’t wait to spread our xcBAI to the Polkadot world through the XCM! ✅

---

<div class="post-metadata">

**Author:** ![bader](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/bader/32/2291_2.png) [@bader](https://forum.polkadot.network/u/bader)\
**Post date:** [March 2, 2023, 4:49pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/11 "2023-03-02T16:49:56Z")

</div>

An initial deepdive on XCM v3 - really good stuff, considering how there isn’t too much in-depth info on v3 yet!

[![](https://europe1.discourse-cdn.com/flex005/uploads/polkadot2/original/2X/c/c43533bceaacaddd7866d2c404063632a3407c6b.jpeg "XCM v3 | Polkadot Deep Dives") ](https://www.youtube.com/watch?v=MMIPNR3SuB4)

---

<div class="post-metadata">

**Author:** ![dudo50](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/dudo50/32/478_2.png) [@dudo50](https://forum.polkadot.network/u/dudo50)\
**Post date:** [March 20, 2023, 3:26pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/12 "2023-03-20T15:26:30Z")

</div>

Little late to the party, but we work on a tool that unifies cross-chain experience for dApp developers by wrapping the XCM pallet of each compatible parachain. It is very easy to implement also! Might be helpful to someone :). We are open to any implementation and are going to work on any issues raised asap.

Docs: [What is ParaSpell✨ | ParaSpell](https://paraspell.github.io/docs/)  
Organization: [ParaSpell · GitHub](https://github.com/paraspell)

---

<div class="post-metadata">

**Author:** ![AlexD10S](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/alexd10s/32/2921_2.png) [@AlexD10S](https://forum.polkadot.network/u/AlexD10S)\
**Post date:** [August 23, 2023, 1:00pm UTC](https://forum.polkadot.network/t/best-resources-to-learn-xcm-tech-high-level/192/13 "2023-08-23T13:00:26Z")

</div>

I want to add here more practical resources:

The last 2 deep dives, both about XCM.

- [XCM Simulator & xcm-emulator for parachain integration testing](https://www.youtube.com/watch?v=HJo9SO1CAEQ)

- [XCM e2e integration testing](https://www.youtube.com/watch?v=9CF5FAwlu2c)

And the repository with examples from the XCM Docs: [https://github.com/paritytech/xcm-docs/tree/main/examples](https://github.com/paritytech/xcm-docs/tree/main/examples).  
Very recommended to clone this repository and play with these examples.
