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

difftreelog

Merge pull request #936 from UniqueNetwork/build/941056

Yaroslav Bolyukin2023-05-24parents: #7bf7837 #748c609.patch.diff
in: master

9 files changed

modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -5,25 +5,25 @@
 
 POLKADOT_MAINNET_BRANCH=release-v0.9.37
 STATEMINT_BUILD_BRANCH=release-parachains-v9370
-ACALA_BUILD_BRANCH=2.12.0
-MOONBEAM_BUILD_BRANCH=runtime-2201
-ASTAR_BUILD_BRANCH=v5.3.0
-UNIQUE_MAINNET_BRANCH=release-v937053
+ACALA_BUILD_BRANCH=2.17.0
+MOONBEAM_BUILD_BRANCH=runtime-2302
+ASTAR_BUILD_BRANCH=v5.4.0
+UNIQUE_MAINNET_BRANCH=release-v941055
 UNIQUE_REPLICA_FROM=wss://ws.unique.network:443
 
 KUSAMA_MAINNET_BRANCH=release-v0.9.38
 STATEMINE_BUILD_BRANCH=release-parachains-v9382
-KARURA_BUILD_BRANCH=release-karura-2.15.0
-MOONRIVER_BUILD_BRANCH=runtime-2201
-SHIDEN_BUILD_BRANCH=v4.49.0
-QUARTZ_MAINNET_BRANCH=release-v937053
+KARURA_BUILD_BRANCH=release-karura-2.17.0
+MOONRIVER_BUILD_BRANCH=runtime-2302
+SHIDEN_BUILD_BRANCH=v5.4.0
+QUARTZ_MAINNET_BRANCH=release-v941055
 QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443
 
-UNIQUEWEST_MAINNET_BRANCH=release-v0.9.40
-WESTMINT_BUILD_BRANCH=parachains-v9400
-OPAL_MAINNET_BRANCH=release-v937053
+UNIQUEWEST_MAINNET_BRANCH=release-v0.9.42
+WESTMINT_BUILD_BRANCH=parachains-v9420
+OPAL_MAINNET_BRANCH=release-v941055
 OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443
 
-UNIQUEEAST_MAINNET_BRANCH=release-v0.9.32
-SAPPHIRE_MAINNET_BRANCH=release-v937053
+UNIQUEEAST_MAINNET_BRANCH=release-v0.9.42
+SAPPHIRE_MAINNET_BRANCH=release-v941055
 SAPPHIRE_REPLICA_FROM=wss://ws-sapphire.unique.network:443
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@
 ```
 git clone https://github.com/paritytech/polkadot.git
 cd polkadot
-git checkout release-v0.9.39
+git checkout release-v0.9.41
 cargo build --release
 ```
 
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -51,7 +51,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 941055,
+	spec_version: 941056,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -54,7 +54,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 941055,
+	spec_version: 941056,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -51,7 +51,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 941055,
+	spec_version: 941056,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
modifiedtests/package.jsondiffbeforeafterboth
--- a/tests/package.json
+++ b/tests/package.json
@@ -116,7 +116,8 @@
     "polkadot-types-fetch-metadata": "curl -H 'Content-Type: application/json' -d '{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\": \"state_getMetadata\", \"params\":[]}' http://localhost:9933 > src/interfaces/metadata.json",
     "polkadot-types-from-defs": "ts-node --esm ./node_modules/.bin/polkadot-types-from-defs --endpoint src/interfaces/metadata.json --input src/interfaces/ --package .",
     "polkadot-types-from-chain": "ts-node --esm ./node_modules/.bin/polkadot-types-from-chain --endpoint src/interfaces/metadata.json --output src/interfaces/ --package .",
-    "polkadot-types": "echo \"export default {}\" > src/interfaces/lookup.ts && yarn polkadot-types-fetch-metadata && yarn polkadot-types-from-defs && yarn polkadot-types-from-defs && yarn polkadot-types-from-chain"
+    "polkadot-types": "echo \"export default {}\" > src/interfaces/lookup.ts && yarn polkadot-types-fetch-metadata && yarn polkadot-types-from-defs && yarn polkadot-types-from-defs && yarn polkadot-types-from-chain",
+    "generateEnv": "ts-node --esm ./src/generateEnv.ts"
   },
   "author": "",
   "license": "SEE LICENSE IN ../LICENSE",
modifiedtests/src/generateEnv.tsdiffbeforeafterboth
--- a/tests/src/generateEnv.ts
+++ b/tests/src/generateEnv.ts
@@ -62,12 +62,14 @@
     ff('wss://rpc.astar.network/', /^(.+)$/, (_, r) => {
       switch (r) {
         case '55': return 'v5.3.0';
+        case '57': return 'v5.4.0';
         default: throw new Error('unknown astar branch for runtime ' + r);
       }
     }).then(v => env = setVar(env, 'ASTAR_BUILD_BRANCH', v)),
     ff('wss://shiden.api.onfinality.io/public-ws', /^(.+)$/, (_, r) => {
       switch (r) {
         case '90': return 'v4.49.0';
+        case '96': return 'v5.4.0';
         default: throw new Error('unknown shiden branch for runtime ' + r);
       }
     }).then(v => env = setVar(env, 'SHIDEN_BUILD_BRANCH', v)),
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
803 let quartzParachainMultilocation: any;803 let quartzParachainMultilocation: any;
804 let quartzAccountMultilocation: any;804 let quartzAccountMultilocation: any;
805 let quartzCombinedMultilocation: any;805 let quartzCombinedMultilocation: any;
806 let quartzCombinedMultilocationKarura: any; // TODO remove it when Karura goes V2
806807
807 let messageSent: any;808 let messageSent: any;
808809
821 };822 };
822823
823 quartzParachainMultilocation = {824 quartzParachainMultilocation = {
824 V1: {825 V2: {
825 parents: 1,826 parents: 1,
826 interior: {827 interior: {
827 X1: quartzParachainJunction,828 X1: quartzParachainJunction,
830 };831 };
831832
832 quartzAccountMultilocation = {833 quartzAccountMultilocation = {
833 V1: {834 V2: {
834 parents: 0,835 parents: 0,
835 interior: {836 interior: {
836 X1: quartzAccountJunction,837 X1: quartzAccountJunction,
837 },838 },
838 },839 },
839 };840 };
841
842 quartzCombinedMultilocation = {
843 V2: {
844 parents: 1,
845 interior: {
846 X2: [quartzParachainJunction, quartzAccountJunction],
847 },
848 },
849 };
840850
841 quartzCombinedMultilocation = {851 quartzCombinedMultilocationKarura = {
842 V1: {852 V1: {
843 parents: 1,853 parents: 1,
844 interior: {854 interior: {
869 const id = {879 const id = {
870 Token: 'KAR',880 Token: 'KAR',
871 };881 };
872 const destination = quartzCombinedMultilocation;882 const destination = quartzCombinedMultilocationKarura;
873 await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');883 await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');
874884
875 messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);885 messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
895 const destinationParachain = quartzParachainMultilocation;905 const destinationParachain = quartzParachainMultilocation;
896 const beneficiary = quartzAccountMultilocation;906 const beneficiary = quartzAccountMultilocation;
897 const assets = {907 const assets = {
898 V1: [{908 V2: [{
899 id: {909 id: {
900 Concrete: {910 Concrete: {
901 parents: 0,911 parents: 0,
1069 itSub('Should connect to Moonriver and send QTZ back', async ({helper}) => {1079 itSub('Should connect to Moonriver and send QTZ back', async ({helper}) => {
1070 await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {1080 await usingMoonriverPlaygrounds(moonriverUrl, async (helper) => {
1071 const asset = {1081 const asset = {
1072 V1: {1082 V2: {
1073 id: {1083 id: {
1074 Concrete: {1084 Concrete: {
1075 parents: 1,1085 parents: 1,
1084 },1094 },
1085 };1095 };
1086 const destination = {1096 const destination = {
1087 V1: {1097 V2: {
1088 parents: 1,1098 parents: 1,
1089 interior: {1099 interior: {
1090 X2: [1100 X2: [
1139 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);1149 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);
11401150
1141 const quartzMultilocation = {1151 const quartzMultilocation = {
1142 V1: {1152 V2: {
1143 parents: 1,1153 parents: 1,
1144 interior: {1154 interior: {
1145 X1: {Parachain: QUARTZ_CHAIN},1155 X1: {Parachain: QUARTZ_CHAIN},
1212 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);1222 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);
12131223
1214 const quartzMultilocation = {1224 const quartzMultilocation = {
1215 V1: {1225 V2: {
1216 parents: 1,1226 parents: 1,
1217 interior: {1227 interior: {
1218 X1: {1228 X1: {
13411351
1342 console.log('2. Register asset location on Shiden');1352 console.log('2. Register asset location on Shiden');
1343 const assetLocation = {1353 const assetLocation = {
1344 V1: {1354 V2: {
1345 parents: 1,1355 parents: 1,
1346 interior: {1356 interior: {
1347 X1: {1357 X1: {
1433 itSub('Should connect to Shiden and send QTZ back', async ({helper}) => {1443 itSub('Should connect to Shiden and send QTZ back', async ({helper}) => {
1434 await usingShidenPlaygrounds(shidenUrl, async (helper) => {1444 await usingShidenPlaygrounds(shidenUrl, async (helper) => {
1435 const destination = {1445 const destination = {
1436 V1: {1446 V2: {
1437 parents: 1,1447 parents: 1,
1438 interior: {1448 interior: {
1439 X1: {1449 X1: {
1444 };1454 };
14451455
1446 const beneficiary = {1456 const beneficiary = {
1447 V1: {1457 V2: {
1448 parents: 0,1458 parents: 0,
1449 interior: {1459 interior: {
1450 X1: {1460 X1: {
1458 };1468 };
14591469
1460 const assets = {1470 const assets = {
1461 V1: [1471 V2: [
1462 {1472 {
1463 id: {1473 id: {
1464 Concrete: {1474 Concrete: {
1515 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);1525 const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);
15161526
1517 const quartzMultilocation = {1527 const quartzMultilocation = {
1518 V1: {1528 V2: {
1519 parents: 1,1529 parents: 1,
1520 interior: {1530 interior: {
1521 X1: {Parachain: QUARTZ_CHAIN},1531 X1: {Parachain: QUARTZ_CHAIN},
1580 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);1590 const [targetAccount] = await helper.arrange.createAccounts([0n], alice);
15811591
1582 const quartzMultilocation = {1592 const quartzMultilocation = {
1583 V1: {1593 V2: {
1584 parents: 1,1594 parents: 1,
1585 interior: {1595 interior: {
1586 X1: {1596 X1: {
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
--- a/tests/src/xcm/xcmUnique.test.ts
+++ b/tests/src/xcm/xcmUnique.test.ts
@@ -805,6 +805,7 @@
   let uniqueParachainMultilocation: any;
   let uniqueAccountMultilocation: any;
   let uniqueCombinedMultilocation: any;
+  let uniqueCombinedMultilocationAcala: any; // TODO remove when Acala goes V2
 
   let messageSent: any;
 
@@ -823,7 +824,7 @@
       };
 
       uniqueParachainMultilocation = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X1: uniqueParachainJunction,
@@ -832,7 +833,7 @@
       };
 
       uniqueAccountMultilocation = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {
             X1: uniqueAccountJunction,
@@ -841,6 +842,15 @@
       };
 
       uniqueCombinedMultilocation = {
+        V2: {
+          parents: 1,
+          interior: {
+            X2: [uniqueParachainJunction, uniqueAccountJunction],
+          },
+        },
+      };
+
+      uniqueCombinedMultilocationAcala = {
         V1: {
           parents: 1,
           interior: {
@@ -871,7 +881,7 @@
       const id = {
         Token: 'ACA',
       };
-      const destination = uniqueCombinedMultilocation;
+      const destination = uniqueCombinedMultilocationAcala;
       await helper.xTokens.transfer(alice, id, testAmount, destination, 'Unlimited');
 
       messageSent = await helper.wait.expectEvent(maxWaitBlocks, Event.XcmpQueue.XcmpMessageSent);
@@ -897,7 +907,7 @@
       const destinationParachain = uniqueParachainMultilocation;
       const beneficiary = uniqueAccountMultilocation;
       const assets = {
-        V1: [{
+        V2: [{
           id: {
             Concrete: {
               parents: 0,
@@ -1072,7 +1082,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,
@@ -1087,7 +1097,7 @@
         },
       };
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X2: [
@@ -1142,7 +1152,7 @@
     const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);
 
     const uniqueMultilocation = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {Parachain: UNIQUE_CHAIN},
@@ -1215,7 +1225,7 @@
     const [targetAccount] = await helper.arrange.createAccounts([0n], alice);
 
     const uniqueMultilocation = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {
@@ -1344,7 +1354,7 @@
 
       console.log('2. Register asset location on Astar');
       const assetLocation = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X1: {
@@ -1436,7 +1446,7 @@
   itSub('Should connect to Astar and send UNQ back', async ({helper}) => {
     await usingAstarPlaygrounds(astarUrl, async (helper) => {
       const destination = {
-        V1: {
+        V2: {
           parents: 1,
           interior: {
             X1: {
@@ -1447,7 +1457,7 @@
       };
 
       const beneficiary = {
-        V1: {
+        V2: {
           parents: 0,
           interior: {
             X1: {
@@ -1461,7 +1471,7 @@
       };
 
       const assets = {
-        V1: [
+        V2: [
           {
             id: {
               Concrete: {
@@ -1517,7 +1527,7 @@
     const [targetAccount] = await helper.arrange.createAccounts([targetAccountBalance], alice);
 
     const uniqueMultilocation = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {Parachain: UNIQUE_CHAIN},
@@ -1582,7 +1592,7 @@
     const [targetAccount] = await helper.arrange.createAccounts([0n], alice);
 
     const uniqueMultilocation = {
-      V1: {
+      V2: {
         parents: 1,
         interior: {
           X1: {
@@ -1652,5 +1662,4 @@
     accountBalance = await helper.balance.getSubstrate(targetAccount.address);
     expect(accountBalance).to.be.equal(0n);
   });
-
 });