@@ -2469,9 +2469,9 @@ XCM V5 improves weight handling by making weight specification optional to reduc
24692469 ```typescript
24702470 // Optional weight specification with fallback
24712471 XcmV5Instruction.Transact({
2472- origin_kind: XcmV2OriginKind.SovereignAccount(),
2473- fallback_max_weight: undefined, // or weight object for compatibility
2474- call: encodedCall
2472+ origin_kind: XcmV2OriginKind.SovereignAccount(),
2473+ fallback_max_weight: undefined, // or weight object for compatibility
2474+ call: encodedCall
24752475 })
24762476 ```
24772477
@@ -2485,14 +2485,14 @@ Use `fallback_max_weight: undefined` when:
24852485- You want automatic weight calculation.
24862486- You prefer simplified, more reliable execution.
24872487
2488- ```typescript
2489- // Preferred approach for v5-compatible destinations
2490- XcmV5Instruction.Transact({
2491- origin_kind: XcmV2OriginKind.SovereignAccount(),
2492- fallback_max_weight: undefined,
2493- call: encodedCall
2494- })
2495- ```
2488+ ```typescript
2489+ // Preferred approach for v5-compatible destinations
2490+ XcmV5Instruction.Transact({
2491+ origin_kind: XcmV2OriginKind.SovereignAccount(),
2492+ fallback_max_weight: undefined,
2493+ call: encodedCall
2494+ })
2495+ ```
24962496
24972497### When to Specify Weight
24982498
@@ -2502,17 +2502,17 @@ Use `fallback_max_weight: { ref_time: ..., proof_size: ... }` when:
25022502- You need backward compatibility.
25032503- You want explicit weight control.
25042504
2505- ```typescript
2506- // Backward compatibility approach
2507- XcmV5Instruction.Transact({
2508- origin_kind: XcmV2OriginKind.SovereignAccount(),
2509- fallback_max_weight: {
2510- ref_time: 1000000000n,
2511- proof_size: 100000n
2512- },
2513- call: encodedCall
2514- })
2515- ```
2505+ ```typescript
2506+ // Backward compatibility approach
2507+ XcmV5Instruction.Transact({
2508+ origin_kind: XcmV2OriginKind.SovereignAccount(),
2509+ fallback_max_weight: {
2510+ ref_time: 1000000000n,
2511+ proof_size: 100000n
2512+ },
2513+ call: encodedCall
2514+ })
2515+ ```
25162516
25172517## Benefits of the New Approach
25182518
@@ -2539,7 +2539,7 @@ When migrating from XCM V4 to XCM V5:
25392539- **For mixed environments**: Keep weight specification for non-v5 chains.
25402540- **Gradual transition**: Start with explicit weights and move to `undefined` as chains upgrade.
25412541
2542- ## Fee implications
2542+ ## Fee Implications
25432543
25442544Fees are still required for `Transact` execution:
25452545
0 commit comments