difftreelog
add script for manual migration
in: master
use westend fix README
5 files changed
.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
tests/src/migrations/942057-appPromotion/README.mddiffbeforeafterboth313132## Execute offchain migration32## Execute offchain migration333334To run, you need to add an environment variable (`SUPERUSER_SEED`) with the sudo key seed.34To run, you need to set an environment variables:35- `SUPERUSER_SEED` – the sudo key seed.36- `WS_RPC` – the network address353736Run the script by executing the following command:38Run the migration by executing the following command:373938```sh40```sh39npx ts-node --esm lockedToFreeze.ts41npx ts-node --esm executeMigration.ts40```42```43tests/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}`);
};
tests/src/migrations/942057-appPromotion/executeMigration.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/migrations/942057-appPromotion/executeMigration.ts
@@ -0,0 +1,11 @@
+import {migrateLockedToFreeze} from './lockedToFreeze';
+
+
+const WS_RPC = process.env.WS_RPC || 'wss://ws-opal.unique.network:443';
+const SUPERUSER_SEED = process.env.SUPERUSER_SEED || '';
+
+migrateLockedToFreeze({
+ wsEndpoint: WS_RPC,
+ donorSeed: SUPERUSER_SEED,
+})
+ .catch(console.error);
\ No newline at end of file
tests/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();
}