When an XCM that is holding funds fails, where do those assets go? Do they disappear? Thankfully not, they get trapped in the same chain where the execution failed.
In order to claim them, all that's needed is to locally execute an XCM with the ClaimAsset
instruction.
AssetsTrapped
eventWhen assets get trapped because of XCM execution failing, the AssetsTrapped
event is emitted:
This event contains the following information:
From version 1.2.0 onwards of the Polkadot and Kusama runtimes (including system parachains), there's a new claim_assets
extrinsic that allows for easily claiming assets trapped in that chain.
In Polkadot JS Apps, choose the chain where your assets were trapped.
Choose the xcm pallet, it's usually called XcmPallet
in relay chains and PolkadotXcm
in system parachains.
Under that, pick the claimAssets
extrinsic.
There are two fields you need to fill:
The first one is the assets exactly as shown in the AssetsTrapped
event we mentioned earlier.
You should use the XCM version that was shown in the AssetsTrapped
event.
You should also add the exact amount of the assets that were trapped.
The second one is the beneficiary, you can just choose your own account or another account you prefer that is local to that chain (no remote transfer will be done).
This is always of the form (parents: 0, interior: X1(AccountId32 { <insert-your-account-id-here> }))
.
Make sure NOT to input the location (parents: 0, interior: Here)
as that will move your recently claimed assets to the local chain origin.
Meaning the chain's governance will have control of your funds, not you.
Here is a screenshot of how the extrinsic call might look like in Polkadot JS Apps (without the assets):
The assets you have to put in might be something like this:
Those assets, when executed in the Polkadot Asset Hub, identify 1 DOT.
Remember, DOT has 10 decimals, so 1 -> 10_000_000_000.
However, no need to worry about this, the AssetsTrapped
event has the correct number.
After that, you should see a new event, AssetsClaimed
, showing you you have claimed your assets, and you should have them in the beneficiary account you specified.
This event has the same fields as AssetsTrapped
.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing