You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop/interoperability/versions/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ template: index-page.html
8
8
9
9
XCM is a versioned language that evolves to meet the growing needs of cross-chain communication in the Polkadot ecosystem. Understanding XCM versioning is essential for developers building interoperable applications to keep up with the latest improvements.
10
10
11
-
New versions are defined via [Polkadot Fellowship RFCs](https://github.com/polkadot-fellows/rfcs){target=\_blank}, ensuring each iteration is thoroughly reviewed. The whole of this documentation uses _XCM V5_ as the primary reference, which is the current stable version.
11
+
New versions are defined via [Polkadot Fellowship RFCs](https://github.com/polkadot-fellows/rfcs){target=\_blank}, ensuring each iteration is thoroughly reviewed. This entire documentation uses _XCM V5_ as the primary reference, which is the current stable version.
12
12
13
13
Each new version introduces new functionality while maintaining backward compatibility where possible. By understanding version differences, you can make informed decisions about which features to use and how to future-proof your applications.
Copy file name to clipboardExpand all lines: develop/interoperability/versions/v5/fees.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Explore the key differences in fee handling between XCM V4 and V5,
5
5
6
6
# Fees (XCM V4 → XCM V5)
7
7
8
-
XCM V5 introduces a new fee payment mechanism that simplifies and unifies how fees are handled across different types of XCM operations.
8
+
XCM V5 introduces a new fee payment mechanism that simplifies and unifies the handling of fees across various XCM operations.
9
9
10
10
## Key Changes from V4
11
11
@@ -18,12 +18,12 @@ XCM V5 replaces the [`BuyExecution`](https://paritytech.github.io/polkadot-sdk/m
18
18
- Used `BuyExecution` instruction that handles only execution fees.
19
19
- Leftover assets after buying execution are returned to holding.
20
20
- Required explicit specification of execution weight limits.
21
-
- Delivery fees might not be found and error out.
21
+
- Delivery fees may not be found, and an error may occur.
22
22
23
23
-**XCM V5 Approach:**
24
24
25
25
- Introduces `PayFees` instruction for unified fee handling.
26
-
- All assets passed to `PayFees` are kept in a special `fees` register, they are _NOT_ returned to holding.
26
+
- All assets passed to `PayFees` are kept in a special `fees` register; they are _NOT_ returned to holding.
27
27
- No need to specify weights, only assets.
28
28
- More predictable.
29
29
@@ -58,8 +58,8 @@ XcmV4Instruction.BuyExecution({
58
58
59
59
XCM V5 maintains backward compatibility with `BuyExecution` for existing implementations. Both instructions are supported, allowing gradual migration:
60
60
61
-
-**BuyExecution**: Still supported for compatibility with existing XCM programs
62
-
-**PayFees**: Recommended for new development and simplified fee management
61
+
-**BuyExecution**: Still supported for compatibility with existing XCM programs.
62
+
-**PayFees**: Recommended for new development and simplified fee management.
63
63
64
64
## Migration Considerations
65
65
@@ -71,13 +71,13 @@ When migrating from XCM V4 to XCM V5:
71
71
- No breaking changes to existing functionality.
72
72
73
73
When using `PayFees`, keep in mind that _ALL_ assets passed to the instruction will be entirely dedicated to fees, not returned to holding.
74
-
That's why it's more important than before to [properly estimate XCM fees](/develop/interoperability/xcm-runtime-apis/){target=\_blank}.
74
+
That's why it's more important than before to [to estimate XCM fees properly](/develop/interoperability/xcm-runtime-apis/){target=\_blank}.
75
75
76
76
## `RefundSurplus` Instruction
77
77
78
78
When you overestimate fees with [`PayFees`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Instruction.html#variant.PayFees){target=\_blank}, you can recover unused funds using the [`RefundSurplus`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Instruction.html#variant.RefundSurplus){target=\_blank} instruction.
79
79
80
-
You can use `RefundSurplus` to put the leftover fees back into holding. This is useful when you've overestimated the fees needed for your XCM program. You can then deposit them to some account with [`DepositAsset`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Instruction.html#variant.DepositAsset){target=\_blank}.
80
+
You can use `RefundSurplus` to put the leftover fees back into holding. This is useful when you've overestimated the fees needed for your XCM program. You can then deposit them into some account with [`DepositAsset`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Instruction.html#variant.DepositAsset){target=\_blank}.
Copy file name to clipboardExpand all lines: develop/interoperability/versions/v5/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,9 +26,9 @@ Version 5 addresses key pain points that developers faced in previous versions:
26
26
-**Before XCM V5**
27
27
- Cross-chain transfers were limited to only one transfer type, requiring multiple different XCMs to send the entirety of the tokens.
28
28
- Fee management across multiple hops was extremely complicated to get right, particularly because of delivery fees.
29
-
- Cross-chain transfers cleared the origin, making it impossible to [`Transact`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v4/enum.Instruction.html#variant.Transact) in the same XCM as a transfer.
29
+
- Cross-chain transfers cleared the origin, making it impossible to [`Transact`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v4/enum.Instruction.html#variant.Transact){target=\_blank} in the same XCM as a transfer.
30
30
- Claiming trapped assets when transfers failed was troublesome, most of the time requiring governance to intervene.
31
-
- Having to specify the weight for `Transact` was really brittle.
31
+
- Having to specify the weight for `Transact` was brittle.
32
32
-**After XCM V5**
33
33
- A unified cross-chain transfer instruction handles all possible transfer types and allows multiple ones in the same XCM.
34
34
- The fee payment mechanism has been standardized to handle multiple types of fees, making fees much more predictable.
Ensure to replace the `<INSERT_RPC_WEB_SOCKET_ENDPOINT>` with the actual RPC web socket endpoint of the chain.
29
29
30
-
Alternatively, you can navigate to the [PAPI developer console](https://dev.papi.how/extrinsics){target=\_blank}, connect to the chain and under extrinsics choose `PolkadotXcm -> execute` and check for the V5 variant:
30
+
Alternatively, you can navigate to the [PAPI developer console](https://dev.papi.how/extrinsics){target=\_blank}, connect to the chain, and under extrinsics choose `PolkadotXcm -> execute` and check for the V5 variant:
-With`BuyExecution`, iftoomuchwassuppliedforfees, theleftoverafterpayingforexecutionwouldbereturnedtothe [holdingregister](https://paritytech.github.io/polkadot-sdk/master/staging_xcm_executor/struct.XcmExecutor.html#method.holding) to be used in the rest of the XCM.
ThenetworkIDs, usedinthe`GlobalConsensus`junction, for`Rococo`and`Westend`wereremoved. Instead, thegeneric`ByGenesis`networkIDshouldbeusedforreferencingtestnets. Thischangewasmadebecausetestnetscomeandgo, aswasshownbythe [removalofRococo](https://forum.polkadot.network/t/rococo-to-be-deprecated-in-october/8702) and [appearance of Paseo](https://forum.polkadot.network/t/the-new-polkadot-community-testnet/4956). From now on, only mainnets will have an explicit network ID, testnets should always be referenced with `ByGenesis`.
352
+
ThenetworkIDs, usedinthe`GlobalConsensus`junction, for`Rococo`and`Westend`wereremoved. Instead, thegeneric`ByGenesis`networkIDshouldbeusedforreferencingtestnets. Thischangewasmadebecausetestnetscomeandgo, aswasshownbythe [removalofRococo](https://forum.polkadot.network/t/rococo-to-be-deprecated-in-october/8702) and [appearance of Paseo](https://forum.polkadot.network/t/the-new-polkadot-community-testnet/4956). From now on, only mainnets will have an explicit network ID; testnets should always be referenced with `ByGenesis`.
Copy file name to clipboardExpand all lines: develop/interoperability/xcm-guides/from-apps/claiming-trapped-assets.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,17 @@ description: How to claim assets that become trapped on-chain due to an XCM exec
7
7
8
8
## Introduction
9
9
10
-
When XCM execution fails or succeeds, leftover assets can become "trapped" on the destination chain. These assets are held by the system but not accessible through normal means. XCM provides mechanisms to claim these trapped assets and recover them.
10
+
When XCM execution fails or succeeds, leftover assets can become "trapped" on the destination chain. These assets are held by the system but are not accessible through normal means. XCM provides mechanisms to claim these trapped assets and recover them.
11
11
This guide details the process and required steps to claim trapped assets.
12
12
13
13
## Trapped Assets Causes
14
14
15
15
Assets become trapped whenever execution halts and there are leftover assets. This can happen for example if:
16
16
17
-
- An XCM execution throws an error in any instruction when assets are in holding:
17
+
- An XCM execution throws an error in any instruction when assets are in holding such as:
18
18
-`DepositAsset` can't deposit because the account doesn't exist.
19
19
-`Transact` can't execute the call because it doesn't exist.
20
20
-`PayFees` not enough funds or not paying enough for execution.
21
-
- and others.
22
21
23
22
- XCM execution finishes successfully but not all assets were deposited:
24
23
- Funds were withdrawn but some were not deposited.
@@ -216,10 +215,10 @@ This allows this other `SS58_ACCOUNT` to claim the trapped assets. This could al
Copy file name to clipboardExpand all lines: develop/interoperability/xcm-guides/from-apps/fees.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ There are two main types of fees in XCM: [execution](#execution) and [delivery](
15
15
16
16
## Execution
17
17
18
-
All XCMs have a weight associated to them. Each XCM instruction is benchmarked for a particular system (blockchain), which assigns them a weight. The weight of an XCM is the sum of the weight of all instructions. It's important to correctly benchmark this with the worst case so that your system is safe from [Denial-of-Service (DoS)](https://en.wikipedia.org/wiki/Denial-of-service_attack){target=\_blank} attacks.
18
+
All XCMs have a weight associated with them. Each XCM instruction is benchmarked for a particular system (blockchain), which assigns them a weight. The weight of an XCM is the sum of the weight of all instructions. It's important to correctly benchmark this with the worst case so that your system is safe from [Denial-of-Service (DoS)](https://en.wikipedia.org/wiki/Denial-of-service_attack){target=\_blank} attacks.
19
19
20
20
This generated weight represents how much time, and space, is needed for executing the XCM. It directly translates to _execution fees_.
0 commit comments