git.delta.rocks / unique-network / refs/commits / 17d1cd40a383

difftreelog

fix(tests) use V2 in XCM structs

Daniel Shiposha2023-03-28parent: #5db9357.patch.diff
in: master

3 files changed

modifiedtests/src/xcm/xcmOpal.test.tsdiffbeforeafterboth
8080
81 await usingPlaygrounds(async (helper) => {81 await usingPlaygrounds(async (helper) => {
82 const location = {82 const location = {
83 V1: {83 V2: {
84 parents: 1,84 parents: 1,
85 interior: {X3: [85 interior: {X3: [
86 {86 {
111 // Providing the relay currency to the unique sender account111 // Providing the relay currency to the unique sender account
112 await usingRelayPlaygrounds(relayUrl, async (helper) => {112 await usingRelayPlaygrounds(relayUrl, async (helper) => {
113 const destination = {113 const destination = {
114 V1: {114 V2: {
115 parents: 0,115 parents: 0,
116 interior: {X1: {116 interior: {X1: {
117 Parachain: UNIQUE_CHAIN,117 Parachain: UNIQUE_CHAIN,
120 }};120 }};
121121
122 const beneficiary = {122 const beneficiary = {
123 V1: {123 V2: {
124 parents: 0,124 parents: 0,
125 interior: {X1: {125 interior: {X1: {
126 AccountId32: {126 AccountId32: {
132 };132 };
133133
134 const assets = {134 const assets = {
135 V1: [135 V2: [
136 {136 {
137 id: {137 id: {
138 Concrete: {138 Concrete: {
157 itSub('Should connect and send USDT from Westmint to Opal', async ({helper}) => {157 itSub('Should connect and send USDT from Westmint to Opal', async ({helper}) => {
158 await usingWestmintPlaygrounds(westmintUrl, async (helper) => {158 await usingWestmintPlaygrounds(westmintUrl, async (helper) => {
159 const dest = {159 const dest = {
160 V1: {160 V2: {
161 parents: 1,161 parents: 1,
162 interior: {X1: {162 interior: {X1: {
163 Parachain: UNIQUE_CHAIN,163 Parachain: UNIQUE_CHAIN,
166 }};166 }};
167167
168 const beneficiary = {168 const beneficiary = {
169 V1: {169 V2: {
170 parents: 0,170 parents: 0,
171 interior: {X1: {171 interior: {X1: {
172 AccountId32: {172 AccountId32: {
178 };178 };
179179
180 const assets = {180 const assets = {
181 V1: [181 V2: [
182 {182 {
183 id: {183 id: {
184 Concrete: {184 Concrete: {
243243
244 itSub('Should connect and send USDT from Unique to Statemine back', async ({helper}) => {244 itSub('Should connect and send USDT from Unique to Statemine back', async ({helper}) => {
245 const destination = {245 const destination = {
246 V1: {246 V2: {
247 parents: 1,247 parents: 1,
248 interior: {X2: [248 interior: {X2: [
249 {249 {
301 // Providing the relay currency to the unique sender account301 // Providing the relay currency to the unique sender account
302 await usingRelayPlaygrounds(relayUrl, async (helper) => {302 await usingRelayPlaygrounds(relayUrl, async (helper) => {
303 const destination = {303 const destination = {
304 V1: {304 V2: {
305 parents: 0,305 parents: 0,
306 interior: {X1: {306 interior: {X1: {
307 Parachain: UNIQUE_CHAIN,307 Parachain: UNIQUE_CHAIN,
310 }};310 }};
311311
312 const beneficiary = {312 const beneficiary = {
313 V1: {313 V2: {
314 parents: 0,314 parents: 0,
315 interior: {X1: {315 interior: {X1: {
316 AccountId32: {316 AccountId32: {
322 };322 };
323323
324 const assets = {324 const assets = {
325 V1: [325 V2: [
326 {326 {
327 id: {327 id: {
328 Concrete: {328 Concrete: {
368 });368 });
369369
370 const destination = {370 const destination = {
371 V1: {371 V2: {
372 parents: 1,372 parents: 1,
373 interior: {373 interior: {
374 X1:{374 X1:{
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -113,7 +113,7 @@
 
     await usingPlaygrounds(async (helper) => {
       const location = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {X3: [
             {
@@ -145,7 +145,7 @@
     // (fee for USDT XCM are paid in relay tokens)
     await usingRelayPlaygrounds(relayUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             Parachain: QUARTZ_CHAIN,
@@ -154,7 +154,7 @@
         }};
 
       const beneficiary = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -166,7 +166,7 @@
       };
 
       const assets = {
-        V1: [
+        V2: [
           {
             id: {
               Concrete: {
@@ -191,7 +191,7 @@
   itSub('Should connect and send USDT from Statemine to Quartz', async ({helper}) => {
     await usingStateminePlaygrounds(statemineUrl, async (helper) => {
       const dest = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {X1: {
             Parachain: QUARTZ_CHAIN,
@@ -200,7 +200,7 @@
         }};
 
       const beneficiary = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -212,7 +212,7 @@
       };
 
       const assets = {
-        V1: [
+        V2: [
           {
             id: {
               Concrete: {
@@ -276,7 +276,7 @@
 
   itSub('Should connect and send USDT from Quartz to Statemine back', async ({helper}) => {
     const destination = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {X2: [
           {
@@ -332,7 +332,7 @@
 
     await usingRelayPlaygrounds(relayUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             Parachain: QUARTZ_CHAIN,
@@ -341,7 +341,7 @@
         }};
 
       const beneficiary = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -353,7 +353,7 @@
       };
 
       const assets = {
-        V1: [
+        V2: [
           {
             id: {
               Concrete: {
@@ -401,7 +401,7 @@
     });
 
     const destination = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1:{
@@ -470,7 +470,7 @@
 
     await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X1: {
@@ -501,7 +501,7 @@
 
   itSub('Should connect and send QTZ to Karura', async ({helper}) => {
     const destination = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {
@@ -512,7 +512,7 @@
     };
 
     const beneficiary = {
-      V1: {
+      V2: {
         parents: 0,
         interior: {
           X1: {
@@ -526,7 +526,7 @@
     };
 
     const assets = {
-      V1: [
+      V2: [
         {
           id: {
             Concrete: {
@@ -580,7 +580,7 @@
   itSub('Should connect to Karura and send QTZ back', async ({helper}) => {
     await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X2: [
@@ -644,7 +644,7 @@
   itSub('Quartz rejects KAR tokens from Karura', async ({helper}) => {
     await usingKaruraPlaygrounds(karuraUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X2: [
@@ -865,7 +865,7 @@
       NativeAssetId: 'Here',
     };
     const dest = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X2: [
@@ -905,7 +905,7 @@
   itSub('Should connect to Moonriver and send QTZ back', async ({helper}) => {
     await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {
       const asset = {
-        V1: {
+        V2: {
           id: {
             Concrete: {
               parents: 1,
@@ -920,7 +920,7 @@
         },
       };
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X2: [
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -113,7 +113,7 @@
 
     await usingPlaygrounds(async (helper) => {
       const location = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {X3: [
             {
@@ -145,7 +145,7 @@
     // (fee for USDT XCM are paid in relay tokens)
     await usingRelayPlaygrounds(relayUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             Parachain: UNIQUE_CHAIN,
@@ -154,7 +154,7 @@
         }};
 
       const beneficiary = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -166,7 +166,7 @@
       };
 
       const assets = {
-        V1: [
+        V2: [
           {
             id: {
               Concrete: {
@@ -191,7 +191,7 @@
   itSub('Should connect and send USDT from Statemint to Unique', async ({helper}) => {
     await usingStatemintPlaygrounds(statemintUrl, async (helper) => {
       const dest = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {X1: {
             Parachain: UNIQUE_CHAIN,
@@ -200,7 +200,7 @@
         }};
 
       const beneficiary = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -212,7 +212,7 @@
       };
 
       const assets = {
-        V1: [
+        V2: [
           {
             id: {
               Concrete: {
@@ -276,7 +276,7 @@
 
   itSub('Should connect and send USDT from Unique to Statemint back', async ({helper}) => {
     const destination = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {X2: [
           {
@@ -332,7 +332,7 @@
 
     await usingRelayPlaygrounds(relayUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             Parachain: UNIQUE_CHAIN,
@@ -341,7 +341,7 @@
         }};
 
       const beneficiary = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {X1: {
             AccountId32: {
@@ -353,7 +353,7 @@
       };
 
       const assets = {
-        V1: [
+        V2: [
           {
             id: {
               Concrete: {
@@ -401,7 +401,7 @@
     });
 
     const destination = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1:{
@@ -470,7 +470,7 @@
 
     await usingAcalaPlaygrounds(acalaUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X1: {
@@ -502,7 +502,7 @@
   itSub('Should connect and send UNQ to Acala', async ({helper}) => {
 
     const destination = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {
@@ -513,7 +513,7 @@
     };
 
     const beneficiary = {
-      V1: {
+      V2: {
         parents: 0,
         interior: {
           X1: {
@@ -527,7 +527,7 @@
     };
 
     const assets = {
-      V1: [
+      V2: [
         {
           id: {
             Concrete: {
@@ -581,7 +581,7 @@
   itSub('Should connect to Acala and send UNQ back', async ({helper}) => {
     await usingAcalaPlaygrounds(acalaUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X2: [
@@ -645,7 +645,7 @@
   itSub('Unique rejects ACA tokens from Acala', async ({helper}) => {
     await usingAcalaPlaygrounds(acalaUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X2: [
@@ -866,7 +866,7 @@
       NativeAssetId: 'Here',
     };
     const dest = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X2: [
@@ -907,7 +907,7 @@
   itSub('Should connect to Moonbeam and send UNQ back', async ({helper}) => {
     await usingMoonbeamPlaygrounds(moonbeamUrl, async (helper) => {
       const asset = {
-        V1: {
+        V2: {
           id: {
             Concrete: {
               parents: 1,
@@ -922,7 +922,7 @@
         },
       };
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X2: [