git.delta.rocks / unique-network / refs/commits / 396344dac004

difftreelog

Merge pull request #908 from UniqueNetwork/fix/xcmv3-tests

Yaroslav Bolyukin2023-03-30parents: #39430dd #a21076b.patch.diff
in: master
Fix/xcmv3 tests

8 files changed

modified.docker/additional/xcm-rococo/Dockerfile-xcm-opal-rococo.tempdiffbeforeafterboth
--- a/.docker/additional/xcm-rococo/Dockerfile-xcm-opal-rococo.temp
+++ b/.docker/additional/xcm-rococo/Dockerfile-xcm-opal-rococo.temp
@@ -1,5 +1,5 @@
-FROM uniquenetwork/builder-polkadot:{{ POLKADOT_BUILD_BRANCH }} as polkadot
-FROM uniquenetwork/builder-cumulus:{{ STATEMINE_BUILD_BRANCH }} as cumulus
+FROM uniquenetwork/builder-polkadot:{{ UNIQUEWEST_MAINNET_BRANCH }} as polkadot
+FROM uniquenetwork/builder-cumulus:{{ WESTMINT_BUILD_BRANCH }} as cumulus
 
 # ===== Rust builder =====
 FROM ubuntu:22.04 as rust-builder
@@ -60,6 +60,7 @@
     yarn install
 
 COPY --from=builder-unique /unique_parachain/.docker/additional/xcm-rococo/launch-config-xcm-opal-rococo.json /polkadot-launch/launch-config.json
+COPY --from=builder-unique /unique_parachain/.docker/xcm-config/5validators.jsonnet /polkadot-launch/5validators.jsonnet
 
 COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/
 COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/
modified.docker/additional/xcm-rococo/Dockerfile-xcm-quartz-rococo.tempdiffbeforeafterboth
--- a/.docker/additional/xcm-rococo/Dockerfile-xcm-quartz-rococo.temp
+++ b/.docker/additional/xcm-rococo/Dockerfile-xcm-quartz-rococo.temp
@@ -1,4 +1,4 @@
-FROM uniquenetwork/builder-polkadot:{{ POLKADOT_BUILD_BRANCH }} as polkadot
+FROM uniquenetwork/builder-polkadot:{{ KUSAMA_MAINNET_BRANCH }} as polkadot
 FROM uniquenetwork/builder-moonbeam:{{ MOONRIVER_BUILD_BRANCH }} as moonbeam
 FROM uniquenetwork/builder-cumulus:{{ STATEMINE_BUILD_BRANCH }} as cumulus
 FROM uniquenetwork/builder-acala:{{ KARURA_BUILD_BRANCH }} as acala
modified.docker/additional/xcm-rococo/Dockerfile-xcm-unique-rococo.tempdiffbeforeafterboth
--- a/.docker/additional/xcm-rococo/Dockerfile-xcm-unique-rococo.temp
+++ b/.docker/additional/xcm-rococo/Dockerfile-xcm-unique-rococo.temp
@@ -1,4 +1,4 @@
-FROM uniquenetwork/builder-polkadot:{{ POLKADOT_BUILD_BRANCH }} as polkadot
+FROM uniquenetwork/builder-polkadot:{{ POLKADOT_MAINNET_BRANCH }} as polkadot
 FROM uniquenetwork/builder-moonbeam:{{ MOONBEAM_BUILD_BRANCH }} as moonbeam
 FROM uniquenetwork/builder-cumulus:{{ STATEMINT_BUILD_BRANCH }} as cumulus
 FROM uniquenetwork/builder-acala:{{ ACALA_BUILD_BRANCH }} as acala
modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -3,22 +3,22 @@
 POLKADOT_LAUNCH_BRANCH=unique-network
 RELAY_CHAIN_TYPE=westend
 
-POLKADOT_MAINNET_BRANCH=release-v0.9.36
-STATEMINT_BUILD_BRANCH=release-parachains-v9360
+POLKADOT_MAINNET_BRANCH=release-v0.9.37
+STATEMINT_BUILD_BRANCH=release-parachains-v9370
 ACALA_BUILD_BRANCH=2.12.0
-MOONBEAM_BUILD_BRANCH=runtime-2000
+MOONBEAM_BUILD_BRANCH=runtime-2100
 UNIQUE_MAINNET_BRANCH=release-v930033-fix-gas-price
 UNIQUE_REPLICA_FROM=wss://ws.unique.network:443
 
 KUSAMA_MAINNET_BRANCH=release-v0.9.37
-STATEMINE_BUILD_BRANCH=release-parachains-v9360
-KARURA_BUILD_BRANCH=release-karura-2.12.0
-MOONRIVER_BUILD_BRANCH=runtime-2100
+STATEMINE_BUILD_BRANCH=release-parachains-v9370
+KARURA_BUILD_BRANCH=release-karura-2.15.0
+MOONRIVER_BUILD_BRANCH=runtime-2201
 QUARTZ_MAINNET_BRANCH=release-v930034-fix-gas-price
 QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443
 
-UNIQUEWEST_MAINNET_BRANCH=release-v0.9.36
-WESTMINT_BUILD_BRANCH=parachains-v9370
+UNIQUEWEST_MAINNET_BRANCH=release-v0.9.40
+WESTMINT_BUILD_BRANCH=release-parachains-v9382
 OPAL_MAINNET_BRANCH=release-v937052
 OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443
 
modified.github/workflows/xcm.ymldiffbeforeafterboth
--- a/.github/workflows/xcm.yml
+++ b/.github/workflows/xcm.yml
@@ -40,9 +40,9 @@
         id: create_matrix
         with:
           matrix: |
-            network {opal}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, runtest {testXcmOpal}
-            network {quartz}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, runtest {testXcmQuartz}
-            network {unique}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, runtest {testXcmUnique}
+            network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, runtest {testXcmOpal}
+            network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, runtest {testXcmQuartz}
+            network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, runtest {testXcmUnique}
 
   xcm-build:
     
@@ -90,10 +90,10 @@
         uses: cuchi/jinja2-action@v1.2.0
         with:
           template: .docker/Dockerfile-polkadot.j2
-          output_file: .docker/Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml
+          output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml
           variables: |
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
-            POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
+            POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
 
       - name: Check if the dockerhub repository contains the needed version POLKADOT
         run: |
@@ -107,14 +107,14 @@
             echo "POLKADOT TAGS:"
             echo $POLKADOT_TAGS
           # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS
-            if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ env.POLKADOT_BUILD_BRANCH }}"($|[[:space:]]) ]]; then
+            if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.relay_branch }}"($|[[:space:]]) ]]; then
                 echo "Repository has needed POLKADOT version";
-                docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
+                docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
             else
                 echo "Repository has not needed POLKADOT version, so build it";
-                cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml --tag uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }} .
+                cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ matrix.relay_branch }}.yml --tag uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} .
                 echo "Push needed POLKADOT version to the repository";
-                docker push uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
+                docker push uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
             fi
         shell: bash
 
@@ -238,7 +238,7 @@
           variables: |
             RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
             NETWORK=${{ matrix.network }}
-            POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
+            POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
             POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}           
             BRANCH=${{ github.head_ref }}
             ACALA_BUILD_BRANCH=${{ matrix.acala_version }}
modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
--- a/tests/src/util/playgrounds/unique.ts
+++ b/tests/src/util/playgrounds/unique.ts
@@ -2951,6 +2951,10 @@
     await this.helper.executeExtrinsic(signer, `api.tx.${this.palletName}.limitedReserveTransferAssets`, [destination, beneficiary, assets, feeAssetItem, weightLimit], true);
   }
 
+  async setSafeXcmVersion(signer: TSigner, version: number) {
+    await this.helper.executeExtrinsic(signer, `api.tx.${this.palletName}.forceDefaultXcmVersion`, [version], true);
+  }
+
   async teleportAssets(signer: TSigner, destination: any, beneficiary: any, assets: any, feeAssetItem: number) {
     await this.helper.executeExtrinsic(signer, `api.tx.${this.palletName}.teleportAssets`, [destination, beneficiary, assets, feeAssetItem], true);
   }
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
49const USDT_ASSET_METADATA_MINIMAL_BALANCE = 1n;49const USDT_ASSET_METADATA_MINIMAL_BALANCE = 1n;
50const USDT_ASSET_AMOUNT = 10_000_000_000_000_000_000_000_000n;50const USDT_ASSET_AMOUNT = 10_000_000_000_000_000_000_000_000n;
51
52const SAFE_XCM_VERSION = 2;
5153
52describeXCM('[XCM] Integration test: Exchanging USDT with Statemine', () => {54describeXCM('[XCM] Integration test: Exchanging USDT with Statemine', () => {
53 let alice: IKeyringPair;55 let alice: IKeyringPair;
6971
7072
71 before(async () => {73 before(async () => {
72 await usingPlaygrounds(async (_helper, privateKey) => {74 await usingPlaygrounds(async (helper, privateKey) => {
73 alice = await privateKey('//Alice');75 alice = await privateKey('//Alice');
74 bob = await privateKey('//Bob'); // sovereign account on Statemine(t) funds donor76 bob = await privateKey('//Bob'); // sovereign account on Statemine(t) funds donor
77
78 // Set the default version to wrap the first message to other chains.
79 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
75 });80 });
7681
77 await usingRelayPlaygrounds(relayUrl, async (helper) => {82 await usingRelayPlaygrounds(relayUrl, async (helper) => {
145 // (fee for USDT XCM are paid in relay tokens)150 // (fee for USDT XCM are paid in relay tokens)
146 await usingRelayPlaygrounds(relayUrl, async (helper) => {151 await usingRelayPlaygrounds(relayUrl, async (helper) => {
147 const destination = {152 const destination = {
148 V2: {153 V1: {
149 parents: 0,154 parents: 0,
150 interior: {X1: {155 interior: {X1: {
151 Parachain: QUARTZ_CHAIN,156 Parachain: QUARTZ_CHAIN,
154 }};159 }};
155160
156 const beneficiary = {161 const beneficiary = {
157 V2: {162 V1: {
158 parents: 0,163 parents: 0,
159 interior: {X1: {164 interior: {X1: {
160 AccountId32: {165 AccountId32: {
166 };171 };
167172
168 const assets = {173 const assets = {
169 V2: [174 V1: [
170 {175 {
171 id: {176 id: {
172 Concrete: {177 Concrete: {
191 itSub('Should connect and send USDT from Statemine to Quartz', async ({helper}) => {196 itSub('Should connect and send USDT from Statemine to Quartz', async ({helper}) => {
192 await usingStateminePlaygrounds(statemineUrl, async (helper) => {197 await usingStateminePlaygrounds(statemineUrl, async (helper) => {
193 const dest = {198 const dest = {
194 V2: {199 V1: {
195 parents: 1,200 parents: 1,
196 interior: {X1: {201 interior: {X1: {
197 Parachain: QUARTZ_CHAIN,202 Parachain: QUARTZ_CHAIN,
200 }};205 }};
201206
202 const beneficiary = {207 const beneficiary = {
203 V2: {208 V1: {
204 parents: 0,209 parents: 0,
205 interior: {X1: {210 interior: {X1: {
206 AccountId32: {211 AccountId32: {
212 };217 };
213218
214 const assets = {219 const assets = {
215 V2: [220 V1: [
216 {221 {
217 id: {222 id: {
218 Concrete: {223 Concrete: {
314319
315 // the commission has been paid in parachain native token320 // the commission has been paid in parachain native token
316 balanceQuartzFinal = await helper.balance.getSubstrate(alice.address);321 balanceQuartzFinal = await helper.balance.getSubstrate(alice.address);
317 console.log('[Quartz -> Statemine] transaction fees on Quartz: %s QTZ', helper.util.bigIntToDecimals(balanceQuartzFinal - balanceQuartzAfter));322 console.log('[Quartz -> Statemine] transaction fees on Quartz: %s QTZ', helper.util.bigIntToDecimals(balanceQuartzAfter - balanceQuartzFinal));
318 expect(balanceQuartzAfter > balanceQuartzFinal).to.be.true;323 expect(balanceQuartzAfter > balanceQuartzFinal).to.be.true;
319324
320 await usingStateminePlaygrounds(statemineUrl, async (helper) => {325 await usingStateminePlaygrounds(statemineUrl, async (helper) => {
332337
333 await usingRelayPlaygrounds(relayUrl, async (helper) => {338 await usingRelayPlaygrounds(relayUrl, async (helper) => {
334 const destination = {339 const destination = {
335 V2: {340 V1: {
336 parents: 0,341 parents: 0,
337 interior: {X1: {342 interior: {X1: {
338 Parachain: QUARTZ_CHAIN,343 Parachain: QUARTZ_CHAIN,
341 }};346 }};
342347
343 const beneficiary = {348 const beneficiary = {
344 V2: {349 V1: {
345 parents: 0,350 parents: 0,
346 interior: {X1: {351 interior: {X1: {
347 AccountId32: {352 AccountId32: {
353 };358 };
354359
355 const assets = {360 const assets = {
356 V2: [361 V1: [
357 {362 {
358 id: {363 id: {
359 Concrete: {364 Concrete: {
467 alice = await privateKey('//Alice');472 alice = await privateKey('//Alice');
468 [randomAccount] = await helper.arrange.createAccounts([0n], alice);473 [randomAccount] = await helper.arrange.createAccounts([0n], alice);
474
475 // Set the default version to wrap the first message to other chains.
476 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
469 });477 });
470478
471 await usingKaruraPlaygrounds(karuraUrl, async (helper) => {479 await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
472 const destination = {480 const destination = {
473 V2: {481 V1: {
474 parents: 1,482 parents: 1,
475 interior: {483 interior: {
476 X1: {484 X1: {
580 itSub('Should connect to Karura and send QTZ back', async ({helper}) => {588 itSub('Should connect to Karura and send QTZ back', async ({helper}) => {
581 await usingKaruraPlaygrounds(karuraUrl, async (helper) => {589 await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
582 const destination = {590 const destination = {
583 V2: {591 V1: {
584 parents: 1,592 parents: 1,
585 interior: {593 interior: {
586 X2: [594 X2: [
636 let alice: IKeyringPair;644 let alice: IKeyringPair;
637645
638 before(async () => {646 before(async () => {
639 await usingPlaygrounds(async (_helper, privateKey) => {647 await usingPlaygrounds(async (helper, privateKey) => {
640 alice = await privateKey('//Alice');648 alice = await privateKey('//Alice');
649
650 // Set the default version to wrap the first message to other chains.
651 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
641 });652 });
642 });653 });
643654
644 itSub('Quartz rejects KAR tokens from Karura', async ({helper}) => {655 itSub('Quartz rejects KAR tokens from Karura', async ({helper}) => {
645 await usingKaruraPlaygrounds(karuraUrl, async (helper) => {656 await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
646 const destination = {657 const destination = {
647 V2: {658 V1: {
648 parents: 1,659 parents: 1,
649 interior: {660 interior: {
650 X2: [661 X2: [
727738
728 balanceForeignQtzTokenInit = 0n;739 balanceForeignQtzTokenInit = 0n;
740
741 // Set the default version to wrap the first message to other chains.
742 const alice = quartzDonor;
743 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
729 });744 });
730745
731 await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {746 await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {
905 itSub('Should connect to Moonriver and send QTZ back', async ({helper}) => {920 itSub('Should connect to Moonriver and send QTZ back', async ({helper}) => {
906 await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {921 await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {
907 const asset = {922 const asset = {
908 V2: {923 V1: {
909 id: {924 id: {
910 Concrete: {925 Concrete: {
911 parents: 1,926 parents: 1,
920 },935 },
921 };936 };
922 const destination = {937 const destination = {
923 V2: {938 V1: {
924 parents: 1,939 parents: 1,
925 interior: {940 interior: {
926 X2: [941 X2: [
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -49,6 +49,8 @@
 const USDT_ASSET_METADATA_MINIMAL_BALANCE = 1n;
 const USDT_ASSET_AMOUNT = 10_000_000_000_000_000_000_000_000n;
 
+const SAFE_XCM_VERSION = 2;
+
 describeXCM('[XCM] Integration test: Exchanging USDT with Statemint', () => {
   let alice: IKeyringPair;
   let bob: IKeyringPair;
@@ -69,9 +71,12 @@
 
 
   before(async () => {
-    await usingPlaygrounds(async (_helper, privateKey) => {
+    await usingPlaygrounds(async (helper, privateKey) => {
       alice = await privateKey('//Alice');
       bob = await privateKey('//Bob'); // sovereign account on Statemint funds donor
+
+      // Set the default version to wrap the first message to other chains.
+      await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
     });
 
     await usingRelayPlaygrounds(relayUrl, async (helper) => {
@@ -145,7 +150,7 @@
     // (fee for USDT XCM are paid in relay tokens)
     await usingRelayPlaygrounds(relayUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 0,
           interior: {X1: {
             Parachain: UNIQUE_CHAIN,
@@ -154,7 +159,7 @@
         }};
 
       const beneficiary = {
-        V2: {
+        V1: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -166,7 +171,7 @@
       };
 
       const assets = {
-        V2: [
+        V1: [
           {
             id: {
               Concrete: {
@@ -191,7 +196,7 @@
   itSub('Should connect and send USDT from Statemint to Unique', async ({helper}) => {
     await usingStatemintPlaygrounds(statemintUrl, async (helper) => {
       const dest = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {X1: {
             Parachain: UNIQUE_CHAIN,
@@ -200,7 +205,7 @@
         }};
 
       const beneficiary = {
-        V2: {
+        V1: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -212,7 +217,7 @@
       };
 
       const assets = {
-        V2: [
+        V1: [
           {
             id: {
               Concrete: {
@@ -314,7 +319,7 @@
 
     // the commission has been paid in parachain native token
     balanceUniqueFinal = await helper.balance.getSubstrate(alice.address);
-    console.log('[Unique -> Statemint] transaction fees on Unique: %s UNQ', helper.util.bigIntToDecimals(balanceUniqueFinal - balanceUniqueAfter));
+    console.log('[Unique -> Statemint] transaction fees on Unique: %s UNQ', helper.util.bigIntToDecimals(balanceUniqueAfter - balanceUniqueFinal));
     expect(balanceUniqueAfter > balanceUniqueFinal).to.be.true;
 
     await usingStatemintPlaygrounds(statemintUrl, async (helper) => {
@@ -332,7 +337,7 @@
 
     await usingRelayPlaygrounds(relayUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 0,
           interior: {X1: {
             Parachain: UNIQUE_CHAIN,
@@ -341,7 +346,7 @@
         }};
 
       const beneficiary = {
-        V2: {
+        V1: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -353,7 +358,7 @@
       };
 
       const assets = {
-        V2: [
+        V1: [
           {
             id: {
               Concrete: {
@@ -466,11 +471,14 @@
     await usingPlaygrounds(async (helper, privateKey) => {
       alice = await privateKey('//Alice');
       [randomAccount] = await helper.arrange.createAccounts([0n], alice);
+
+      // Set the default version to wrap the first message to other chains.
+      await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
     });
 
     await usingAcalaPlaygrounds(acalaUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {
             X1: {
@@ -581,7 +589,7 @@
   itSub('Should connect to Acala and send UNQ back', async ({helper}) => {
     await usingAcalaPlaygrounds(acalaUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {
             X2: [
@@ -637,15 +645,18 @@
   let alice: IKeyringPair;
 
   before(async () => {
-    await usingPlaygrounds(async (_helper, privateKey) => {
+    await usingPlaygrounds(async (helper, privateKey) => {
       alice = await privateKey('//Alice');
+
+      // Set the default version to wrap the first message to other chains.
+      await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
     });
   });
 
   itSub('Unique rejects ACA tokens from Acala', async ({helper}) => {
     await usingAcalaPlaygrounds(acalaUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {
             X2: [
@@ -727,6 +738,10 @@
       [randomAccountUnique] = await helper.arrange.createAccounts([0n], uniqueDonor);
 
       balanceForeignUnqTokenInit = 0n;
+
+      // Set the default version to wrap the first message to other chains.
+      const alice = uniqueDonor;
+      await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
     });
 
     await usingMoonbeamPlaygrounds(moonbeamUrl, async (helper) => {
@@ -907,7 +922,7 @@
   itSub('Should connect to Moonbeam and send UNQ back', async ({helper}) => {
     await usingMoonbeamPlaygrounds(moonbeamUrl, async (helper) => {
       const asset = {
-        V2: {
+        V1: {
           id: {
             Concrete: {
               parents: 1,
@@ -922,7 +937,7 @@
         },
       };
       const destination = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {
             X2: [