git.delta.rocks / unique-network / refs/commits / 748c609fe7ab

difftreelog

Build/941056 tests up (#938)

Max Andreev2023-05-22parent: #18191fc.patch.diff
in: master
Use XCM V2

2 files changed

modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -803,6 +803,7 @@
   let quartzParachainMultilocation: any;
   let quartzAccountMultilocation: any;
   let quartzCombinedMultilocation: any;
+  let quartzCombinedMultilocationKarura: any; // TODO remove it when Karura goes V2
 
   let messageSent: any;
 
@@ -847,6 +848,15 @@
         },
       };
 
+      quartzCombinedMultilocationKarura = {
+        V1: {
+          parents: 1,
+          interior: {
+            X2: [quartzParachainJunction, quartzAccountJunction],
+          },
+        },
+      };
+
       // Set the default version to wrap the first message to other chains.
       await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
     });
@@ -869,7 +879,7 @@
       const id = {
         Token: 'KAR',
       };
-      const destination = quartzCombinedMultilocation;
+      const destination = quartzCombinedMultilocationKarura;
       await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');
 
       messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
@@ -1433,7 +1443,7 @@
   itSub('Should connect to Shiden and send QTZ back', async ({helper}) => {
     await usingShidenPlaygrounds(shidenUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X1: {
@@ -1444,7 +1454,7 @@
       };
 
       const beneficiary = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {
             X1: {
@@ -1458,7 +1468,7 @@
       };
 
       const assets = {
-        V1: [
+        V2: [
           {
             id: {
               Concrete: {
@@ -1515,7 +1525,7 @@
     const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);
 
     const quartzMultilocation = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {Parachain: QUARTZ_CHAIN},
@@ -1580,7 +1590,7 @@
     const [targetAccount] = await helper.arrange.createAccounts([0n], alice);
 
     const quartzMultilocation = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
805 let uniqueParachainMultilocation: any;805 let uniqueParachainMultilocation: any;
806 let uniqueAccountMultilocation: any;806 let uniqueAccountMultilocation: any;
807 let uniqueCombinedMultilocation: any;807 let uniqueCombinedMultilocation: any;
808 let uniqueCombinedMultilocationAcala: any; // TODO remove when Acala goes V2
808809
809 let messageSent: any;810 let messageSent: any;
810811
823 };824 };
824825
825 uniqueParachainMultilocation = {826 uniqueParachainMultilocation = {
826 V1: {827 V2: {
827 parents: 1,828 parents: 1,
828 interior: {829 interior: {
829 X1: uniqueParachainJunction,830 X1: uniqueParachainJunction,
849 },850 },
850 };851 };
852
853 uniqueCombinedMultilocationAcala = {
854 V1: {
855 parents: 1,
856 interior: {
857 X2: [uniqueParachainJunction, uniqueAccountJunction],
858 },
859 },
860 };
851861
852 // Set the default version to wrap the first message to other chains.862 // Set the default version to wrap the first message to other chains.
853 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);863 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
871 const id = {881 const id = {
872 Token: 'ACA',882 Token: 'ACA',
873 };883 };
874 const destination = uniqueCombinedMultilocation;884 const destination = uniqueCombinedMultilocationAcala;
875 await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');885 await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');
876886
877 messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);887 messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
1436 itSub('Should connect to Astar and send UNQ back', async ({helper}) => {1446 itSub('Should connect to Astar and send UNQ back', async ({helper}) => {
1437 await usingAstarPlaygrounds(astarUrl, async (helper) => {1447 await usingAstarPlaygrounds(astarUrl, async (helper) => {
1438 const destination = {1448 const destination = {
1439 V1: {1449 V2: {
1440 parents: 1,1450 parents: 1,
1441 interior: {1451 interior: {
1442 X1: {1452 X1: {
1447 };1457 };
14481458
1449 const beneficiary = {1459 const beneficiary = {
1450 V1: {1460 V2: {
1451 parents: 0,1461 parents: 0,
1452 interior: {1462 interior: {
1453 X1: {1463 X1: {
1461 };1471 };
14621472
1463 const assets = {1473 const assets = {
1464 V1: [1474 V2: [
1465 {1475 {
1466 id: {1476 id: {
1467 Concrete: {1477 Concrete: {
1517 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);1527 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);
15181528
1519 const uniqueMultilocation = {1529 const uniqueMultilocation = {
1520 V1: {1530 V2: {
1521 parents: 1,1531 parents: 1,
1522 interior: {1532 interior: {
1523 X1: {Parachain: UNIQUE_CHAIN},1533 X1: {Parachain: UNIQUE_CHAIN},
1582 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);1592 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);
15831593
1584 const uniqueMultilocation = {1594 const uniqueMultilocation = {
1585 V1: {1595 V2: {
1586 parents: 1,1596 parents: 1,
1587 interior: {1597 interior: {
1588 X1: {1598 X1: {