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
39 uses: fabiocaccamo/create-matrix-action@v239 uses: fabiocaccamo/create-matrix-action@v2
40 id: create_matrix40 id: create_matrix
41 with:41 with:
42 matrix: |42 matrix: |
43 network {opal}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, runtest {testXcmOpal}43 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}
44 network {quartz}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, runtest {testXcmQuartz}44 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}
45 network {unique}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, runtest {testXcmUnique}45 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}
4646
47 xcm-build:47 xcm-build:
48 48
90 uses: cuchi/jinja2-action@v1.2.090 uses: cuchi/jinja2-action@v1.2.0
91 with:91 with:
92 template: .docker/Dockerfile-polkadot.j292 template: .docker/Dockerfile-polkadot.j2
93 output_file: .docker/Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml93 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml
94 variables: |94 variables: |
95 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}95 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
96 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}96 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
9797
98 - name: Check if the dockerhub repository contains the needed version POLKADOT98 - name: Check if the dockerhub repository contains the needed version POLKADOT
99 run: |99 run: |
100 # aquire token100 # aquire token
101 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)101 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
102 export TOKEN=$TOKEN102 export TOKEN=$TOKEN
103103
104 # Get TAGS from DOCKERHUB POLKADOT repository104 # Get TAGS from DOCKERHUB POLKADOT repository
105 POLKADOT_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadot/tags/?page_size=100 | jq -r '."results"[]["name"]')105 POLKADOT_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadot/tags/?page_size=100 | jq -r '."results"[]["name"]')
106 # Show TAGS106 # Show TAGS
107 echo "POLKADOT TAGS:"107 echo "POLKADOT TAGS:"
108 echo $POLKADOT_TAGS108 echo $POLKADOT_TAGS
109 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS109 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS
110 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ env.POLKADOT_BUILD_BRANCH }}"($|[[:space:]]) ]]; then110 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.relay_branch }}"($|[[:space:]]) ]]; then
111 echo "Repository has needed POLKADOT version";111 echo "Repository has needed POLKADOT version";
112 docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}112 docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
113 else113 else
114 echo "Repository has not needed POLKADOT version, so build it";114 echo "Repository has not needed POLKADOT version, so build it";
115 cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ env.POLKADOT_BUILD_BRANCH }}.yml --tag uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }} .115 cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ matrix.relay_branch }}.yml --tag uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} .
116 echo "Push needed POLKADOT version to the repository";116 echo "Push needed POLKADOT version to the repository";
117 docker push uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}117 docker push uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}
118 fi118 fi
119 shell: bash119 shell: bash
120120
121 # Check ACALA version and build it if it doesn't exist in repository121 # Check ACALA version and build it if it doesn't exist in repository
235 with:235 with:
236 template: .docker/Dockerfile-xcm.j2236 template: .docker/Dockerfile-xcm.j2
237 output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml237 output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml
238 variables: |238 variables: |
239 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}239 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
240 NETWORK=${{ matrix.network }}240 NETWORK=${{ matrix.network }}
241 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}241 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
242 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} 242 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}
243 BRANCH=${{ github.head_ref }}243 BRANCH=${{ github.head_ref }}
244 ACALA_BUILD_BRANCH=${{ matrix.acala_version }}244 ACALA_BUILD_BRANCH=${{ matrix.acala_version }}
245 MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}245 MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}
246 CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}246 CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}
247247
248 - name: Show build Dockerfile248 - name: Show build Dockerfile
249 run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml249 run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml
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
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.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 Statemine', () => {
   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 Statemine(t) 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: QUARTZ_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 Statemine to Quartz', async ({helper}) => {
     await usingStateminePlaygrounds(statemineUrl, async (helper) => {
       const dest = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {X1: {
             Parachain: QUARTZ_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
     balanceQuartzFinal = await helper.balance.getSubstrate(alice.address);
-    console.log('[Quartz -> Statemine] transaction fees on Quartz: %s QTZ', helper.util.bigIntToDecimals(balanceQuartzFinal - balanceQuartzAfter));
+    console.log('[Quartz -> Statemine] transaction fees on Quartz: %s QTZ', helper.util.bigIntToDecimals(balanceQuartzAfter - balanceQuartzFinal));
     expect(balanceQuartzAfter > balanceQuartzFinal).to.be.true;
 
     await usingStateminePlaygrounds(statemineUrl, async (helper) => {
@@ -332,7 +337,7 @@
 
     await usingRelayPlaygrounds(relayUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 0,
           interior: {X1: {
             Parachain: QUARTZ_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 usingKaruraPlaygrounds(karuraUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {
             X1: {
@@ -580,7 +588,7 @@
   itSub('Should connect to Karura and send QTZ back', async ({helper}) => {
     await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {
             X2: [
@@ -636,15 +644,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('Quartz rejects KAR tokens from Karura', async ({helper}) => {
     await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
       const destination = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {
             X2: [
@@ -726,6 +737,10 @@
       [randomAccountQuartz] = await helper.arrange.createAccounts([0n], quartzDonor);
 
       balanceForeignQtzTokenInit = 0n;
+      
+      // Set the default version to wrap the first message to other chains.
+      const alice = quartzDonor;
+      await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
     });
 
     await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {
@@ -905,7 +920,7 @@
   itSub('Should connect to Moonriver and send QTZ back', async ({helper}) => {
     await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {
       const asset = {
-        V2: {
+        V1: {
           id: {
             Concrete: {
               parents: 1,
@@ -920,7 +935,7 @@
         },
       };
       const destination = {
-        V2: {
+        V1: {
           parents: 1,
           interior: {
             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: [