git.delta.rocks / unique-network / refs/commits / de884669db7a

difftreelog

fix astar xcm tests with xcm v3

Daniel Shiposha2023-03-30parent: #a8f5a1c.patch.diff
in: master

2 files changed

modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -996,7 +996,7 @@
   const qtzToShidenTransferred = 10n * (10n ** QTZ_DECIMALS); // 10 QTZ
   const qtzToShidenArrived = 9_999_999_999_088_000_000n; // 9.999 ... QTZ, Shiden takes a commision in foreign tokens
   const senderIinitialBalanceQTZ = 100n * (10n ** QTZ_DECIMALS); // How many QTZ sender has initially
-  const senderBalanceAfterXCM = 89_941967662676666465n; // 89.94... QTZ after XCM call
+  const senderBalanceAfterXCM = 89_946678090945539197n; // 89.94... QTZ after XCM call
 
   // Shiden -> Quartz
   const qtzFromShidenTransfered = 5n * (10n ** QTZ_DECIMALS); // 5 QTZ
@@ -1007,6 +1007,9 @@
       alice = await privateKey('//Alice');
       [sender] = await helper.arrange.createAccounts([100n], alice);
       console.log('sender', sender.address);
+
+      // Set the default version to wrap the first message to other chains.
+      await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
     });
 
     await usingShidenPlaygrounds(shidenUrl, async (helper) => {
@@ -1051,7 +1054,7 @@
 
   itSub('Should connect and send QTZ to Shiden', async ({helper}) => {
     const destination = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {
@@ -1062,7 +1065,7 @@
     };
 
     const beneficiary = {
-      V1: {
+      V2: {
         parents: 0,
         interior: {
           X1: {
@@ -1076,7 +1079,7 @@
     };
 
     const assets = {
-      V1: [
+      V2: [
         {
           id: {
             Concrete: {
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
998 const unqToAstarTransferred = 10n * (10n ** UNQ_DECIMALS); // 10 UNQ998 const unqToAstarTransferred = 10n * (10n ** UNQ_DECIMALS); // 10 UNQ
999 const unqToAstarArrived = 9_999_999_999_088_000_000n; // 9.999 ... UNQ, Shiden takes a commision in foreign tokens999 const unqToAstarArrived = 9_999_999_999_088_000_000n; // 9.999 ... UNQ, Shiden takes a commision in foreign tokens
1000 const senderIinitialBalanceUNQ = 100n * (10n ** UNQ_DECIMALS); // How many UNQ sender has initially1000 const senderIinitialBalanceUNQ = 100n * (10n ** UNQ_DECIMALS); // How many UNQ sender has initially
1001 const senderBalanceAfterXCM = 89_941967662676666465n; // 89.94... UNQ after XCM call1001 const senderBalanceAfterXCM = 89_946678090945539197n; // 89.94... UNQ after XCM call
10021002
1003 // Astar -> Unique1003 // Astar -> Unique
1004 const unqFromAstarTransfered = 5n * (10n ** UNQ_DECIMALS); // 5 UNQ1004 const unqFromAstarTransfered = 5n * (10n ** UNQ_DECIMALS); // 5 UNQ
1010 [randomAccount] = await helper.arrange.createAccounts([100n], alice);1010 [randomAccount] = await helper.arrange.createAccounts([100n], alice);
1011 console.log('randomAccount', randomAccount.address);1011 console.log('randomAccount', randomAccount.address);
1012
1013 // Set the default version to wrap the first message to other chains.
1014 await helper.getSudo().xcm.setSafeXcmVersion(alice, SAFE_XCM_VERSION);
1012 });1015 });
10131016
1014 await usingAstarPlaygrounds(astarUrl, async (helper) => {1017 await usingAstarPlaygrounds(astarUrl, async (helper) => {
10531056
1054 itSub('Should connect and send UNQ to Astar', async ({helper}) => {1057 itSub('Should connect and send UNQ to Astar', async ({helper}) => {
1055 const destination = {1058 const destination = {
1056 V1: {1059 V2: {
1057 parents: 1,1060 parents: 1,
1058 interior: {1061 interior: {
1059 X1: {1062 X1: {
1064 };1067 };
10651068
1066 const beneficiary = {1069 const beneficiary = {
1067 V1: {1070 V2: {
1068 parents: 0,1071 parents: 0,
1069 interior: {1072 interior: {
1070 X1: {1073 X1: {
1078 };1081 };
10791082
1080 const assets = {1083 const assets = {
1081 V1: [1084 V2: [
1082 {1085 {
1083 id: {1086 id: {
1084 Concrete: {1087 Concrete: {