git.delta.rocks / unique-network / refs/commits / 9773e5ade556

difftreelog

add script for manual migration

Max Andreev2023-06-12parent: #f747618.patch.diff
in: master
use westend
fix README

5 files changed

modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -1,6 +1,6 @@
 RUST_TOOLCHAIN=nightly-2022-11-15
 POLKADOT_LAUNCH_BRANCH=unique-network
-RELAY_CHAIN_TYPE=rococo
+RELAY_CHAIN_TYPE=westend
 CHAINQL=v0.4.1
 DESTINATION_SPEC_VERSION=v942057
 
modifiedtests/src/migrations/942057-appPromotion/README.mddiffbeforeafterboth
--- a/tests/src/migrations/942057-appPromotion/README.md
+++ b/tests/src/migrations/942057-appPromotion/README.md
@@ -31,10 +31,12 @@
 
 ## Execute offchain migration
 
-To run, you need to add an environment variable (`SUPERUSER_SEED`) with the sudo key seed.
+To run, you need to set an environment variables:
+- `SUPERUSER_SEED` – the sudo key seed.
+- `WS_RPC` – the network address
 
-Run the script by executing the following command:
+Run the migration by executing the following command:
 
 ```sh
-npx ts-node --esm lockedToFreeze.ts
-```
\ No newline at end of file
+npx ts-node --esm executeMigration.ts
+```
modifiedtests/src/migrations/942057-appPromotion/collectData.tsdiffbeforeafterboth
--- a/tests/src/migrations/942057-appPromotion/collectData.ts
+++ b/tests/src/migrations/942057-appPromotion/collectData.ts
@@ -1,4 +1,4 @@
-import {exec, execSync} from 'child_process';
+import {exec} from 'child_process';
 import path from 'path';
 import {dirname} from 'path';
 import {fileURLToPath} from 'url';
@@ -8,7 +8,5 @@
 
   const pathToScript = path.resolve(dirName, './stakersParser.jsonnet');
   const outputPath = path.resolve(dirName, './output.json');
-  // execSync(`chainql --tla-str=chainUrl=wss://ws-quartz.unique.network:443 ${pathToScript} > ${outputPath}`);
-  // execSync(`chainql --tla-str=chainUrl=ws://127.0.0.1:9944 ${pathToScript} > ${outputPath}`);
   exec(`chainql --tla-str=chainUrl=ws://127.0.0.1:9944 ${pathToScript} > ${outputPath}`);
 };
addedtests/src/migrations/942057-appPromotion/executeMigration.tsdiffbeforeafterboth

no changes

modifiedtests/src/util/frankenstein.tsdiffbeforeafterboth
--- a/tests/src/util/frankenstein.ts
+++ b/tests/src/util/frankenstein.ts
@@ -263,9 +263,7 @@
       // Enable maintenance mode if present
       await toggleMaintenanceMode(true, para.nodes[0].wsUri);
       if(migration) {
-        console.log('⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️');
         console.log('⭐️⭐️⭐️ Running pre-upgrade scripts... ⭐️⭐️⭐️');
-        console.log('⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️');
         await migration.before();
       }