Skip to main content
18 votes
Accepted

What is the XCM format on Polkadot?

XCM stands for cross-consensus message, and is a message format designed to let multiple different consensus engines communicate with one another. XCM is not specific to Polkadot, however is ...
Shawn Tabrizi's user avatar
  • 16.1k
13 votes
Accepted

What is the difference between XCM and XCMP?

XCM and XCMP are different concepts. To explain from its etymology, XCM stands for Cross Consensus Messages, whereas XCMP is short for Cross Consensus Message Passing. Both names should give you a ...
Keith Yeung's user avatar
  • 2,121
9 votes

What is the XCM format on Polkadot?

To add onto Shawn's detailed answer, the XCM format is comprised of a set of instructions that convey semantics and optionally contain operands that is defined by the spec for the chain that processes ...
Keith Yeung's user avatar
  • 2,121
7 votes
Accepted

How to enable cross-chain asset transfers to a parachain?

The ORML Xtokens pallet is just the first step, as you try to configure it in your chain, you'll quickly see that it requires an XcmExecutor configuration item, which the xcm-executor module offers a ...
Keith Yeung's user avatar
  • 2,121
6 votes

How does the XCVM architecture ensure the absoluteness principle described

I try to answer your question with the code of XCM delivery process via HRMP. Your focus is on "in order", so we pay attention to whether the order of the messages changes, please correct me ...
Guantong's user avatar
  • 1,848
5 votes
Accepted

Can I access storage of relay chain pallet from my parachain?

It is possible but in a somewhat roundabout way. A parablock candidate is always created against a picked relay-parent — a relay-chain block. The storage root of the relay parent will be passed as a ...
pepyakin's user avatar
  • 2,184
4 votes

XCM: Reserve transfer MultiLocation mapping

I am afraid that what you are trying to achieve is currently not possible for Statemint v9230. This recent change: https://github.com/paritytech/cumulus/pull/1318/files will make your test to fail in ...
NachoPal's user avatar
  • 514
4 votes

How can I query the deposit in DOT to create an HRMP channel?

You actually need to go to "Developer" > "Chain State" to check for the HRMP deposit. The function to call is activeConfig() under the configuration pallet. You'll see the ...
Keith Yeung's user avatar
  • 2,121
4 votes
Accepted

Where to learn about XCM (docs)?

Shawn Tabrizi's xcm workshop and video are a good start for learning how to implement XCM. I've also found that compiling and opening polkadots docs to access public documentation for XCM to be very ...
insipx's user avatar
  • 373
4 votes

How to avoid impersonation when using DescendOrigin XCM

So how would I go about ensuring that an origin sent with DescendOrigin is signed, or trusted to be from the person who own the private key of that account Note the ConvertOrigin you mentioned is ...
Guantong's user avatar
  • 1,848
4 votes

I want to enable Teleport Asset functionality in XCM between two parachains. How should I do it? Also, how do I teleport asset from Para1 to Para2?

First check this old answer in StackExchange to see the difference between Asset Teleportation and via Reserve Asset Transfers. You will be able to teleport between parachains, as long as they have a ...
Alex Bean's user avatar
  • 5,757
3 votes
Accepted

XCM between multiple parachains

In fact, when you send a cross-chain message, you actually want to either transfer the token or call the method on target chain. As you said customized message, what do you want the message to do ...
Guantong's user avatar
  • 1,848
3 votes

What is GeneralKey used for in MultiLocation for XCM?

GeneralKey: Usage will vary widely owing to its generality. So it may have different meanings on different chains. And here, @insipx is right. Then, you could find the location from the chain state ...
Guantong's user avatar
  • 1,848
3 votes

Can I access storage of relay chain pallet from my parachain?

Not as part of your synchronous runtime logic, no, that would require all parachains to run inside one state machine, which conflicts with the sharding model.
Bedeho Mender's user avatar
3 votes

I want to send Transact XCM Message with TransferReserveAsset XCM Message from Relay Chain to Parachain

The reserve_transfer_assets call in pallet-xcm is only designed to transfer some assets from the local chain to the sovereign account of a destination chain and forward a notification XCM as you can ...
Iker's user avatar
  • 1,356
3 votes

What prevents a malicious user to spam large XCM messages?

There is an enforced message size limit on the Polkadot side. Right now all XCM messages passed between Parachains are transported via HRMP (horizontal message passing). This involves passing the ...
Bradley Olson's user avatar
3 votes

What prevents a replay attack in XCM?

Replay attacks only work in setups where messages are received via an un-trusted delivery mechanism - hence the need for signing; to authenticate the sender. For XCMP, the delivery channel is already ...
Oliver Tale-Yazdi's user avatar
2 votes

How do I see what channels are set up between parachains?

There's a great visualisation of the kusama channels set up here: https://dotsama-channels.vercel.app/#/ And if you wonder where to get the source data, you can query the following storage from ...
Squirrel's user avatar
  • 3,849
2 votes

Can I access storage of relay chain pallet from my parachain?

You can use an offchain worker to fetch the required storage items from an API
Abdulbee's user avatar
  • 388
2 votes
Accepted

How to open HRMP with Rococo chain?

As Xavier mentioned, relaychain and parachain interact via VMP, so there is no need to open HRMP between parachain and relaychain(Rococo/Kusama/Polkadot), and there is no HRMP between parachain and ...
Guantong's user avatar
  • 1,848
2 votes

Invalid Incoming XCMP message data

After debugging I think it's a bug (pallet-xcm or cumulus-pallet-xcmp-queue), you can track it here: https://github.com/paritytech/cumulus/issues/1700
Guantong's user avatar
  • 1,848
2 votes

What is GeneralKey used for in MultiLocation for XCM?

GeneralKey refers to a general index that will be interpreted by the receiving chain to correspond to something, generally a Token. In the example you show, General Key 0x008 is the location of KAR on ...
insipx's user avatar
  • 373
2 votes

whats the difference between the two different sovereign account addresses?

Sovereign Account: An account controlled by a particular Consensus System, within some other Consensus System. So sovereign account is in other chains, and for different chains, there may be ...
Guantong's user avatar
  • 1,848
2 votes

Where to learn about XCM (docs)?

I also highly recommend trappist if you want to play around with XCM. Follow the instructions in the README to setup a playground with zombienet and try out XCM with the polkadot JS app.
Daan van der Plas's user avatar
2 votes
Accepted

Is direct XCMP possible ? If yes, how?

If by direct you mean XCMP that is implemented without the full message going via the relay chain, then no that is not yet possible. It's on the roadmap after XCM v3 I believe, but the way things are ...
Squirrel's user avatar
  • 3,849
2 votes
Accepted

XCM: How to send assets from the local chain to another via democracy?

Solution is to use utility.dispatchAs and then you can use reserveTransferAssets.
jgreen's user avatar
  • 21
2 votes

I want to enable Teleport Asset functionality in XCM between two parachains. How should I do it? Also, how do I teleport asset from Para1 to Para2?

By default, Para-chains don't trust each other.But there are two ways that u can teleport the assets. First, You need a sovereign account of your parachain in the relay chain and you need to use ...
Arunjot Singh's user avatar
2 votes

How to verify that the XCM message went through successfully?

Great question! As you probably know, one of the properties of XCM is that it is asymmetric - so you fire away and there is no guarantee of results. That being said, you can use the following ...
Bruno's user avatar
  • 8,315
2 votes

How to fix the `FailedToTransactAsset("InsufficientBalance")` error?

Maybe you should pass 212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125 to the substrate utils, the ...
Guantong's user avatar
  • 1,848
2 votes
Accepted

UnexpectedReponse in XCM when using ReportTransactStatus

Do you have your own response handler? Check this: https://github.com/paritytech/polkadot-sdk/blob/v1.4.0/polkadot/xcm/pallet-xcm/src/lib.rs#L2459, it was the default implementation. So first, you ...
Guantong's user avatar
  • 1,848

Only top scored, non community-wiki answers of a minimum length are eligible