difftreelog
add script for manual migration
in: master
use westend fix README
5 files changed
.envdiffbeforeafterboth1RUST_TOOLCHAIN=nightly-2022-11-151RUST_TOOLCHAIN=nightly-2022-11-152POLKADOT_LAUNCH_BRANCH=unique-network2POLKADOT_LAUNCH_BRANCH=unique-network3RELAY_CHAIN_TYPE=rococo3RELAY_CHAIN_TYPE=westend4CHAINQL=v0.4.14CHAINQL=v0.4.15DESTINATION_SPEC_VERSION=v9420575DESTINATION_SPEC_VERSION=v94205766tests/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.tsdiffbeforeafterboth1import {exec, execSync} from 'child_process';1import {exec} from 'child_process';2import path from 'path';2import path from 'path';3import {dirname} from 'path';3import {dirname} from 'path';4import {fileURLToPath} from 'url';4import {fileURLToPath} from 'url';889 const pathToScript = path.resolve(dirName, './stakersParser.jsonnet');9 const pathToScript = path.resolve(dirName, './stakersParser.jsonnet');10 const outputPath = path.resolve(dirName, './output.json');10 const outputPath = path.resolve(dirName, './output.json');11 // execSync(`chainql --tla-str=chainUrl=wss://ws-quartz.unique.network:443 ${pathToScript} > ${outputPath}`);12 // execSync(`chainql --tla-str=chainUrl=ws://127.0.0.1:9944 ${pathToScript} > ${outputPath}`);13 exec(`chainql --tla-str=chainUrl=ws://127.0.0.1:9944 ${pathToScript} > ${outputPath}`);11 exec(`chainql --tla-str=chainUrl=ws://127.0.0.1:9944 ${pathToScript} > ${outputPath}`);14};12};1513tests/src/migrations/942057-appPromotion/executeMigration.tsdiffbeforeafterbothno changes
tests/src/util/frankenstein.tsdiffbeforeafterboth263 // Enable maintenance mode if present263 // Enable maintenance mode if present264 await toggleMaintenanceMode(true, para.nodes[0].wsUri);264 await toggleMaintenanceMode(true, para.nodes[0].wsUri);265 if(migration) {265 if(migration) {266 console.log('⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️');267 console.log('⭐️⭐️⭐️ Running pre-upgrade scripts... ⭐️⭐️⭐️');266 console.log('⭐️⭐️⭐️ Running pre-upgrade scripts... ⭐️⭐️⭐️');268 console.log('⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️');269 await migration.before();267 await migration.before();270 }268 }271269