difftreelog
skip worflow if already upgraded
in: master
- fix manual migration script: use dirname - update envs
3 files changed
.envdiffbeforeafterboth17KARURA_BUILD_BRANCH=release-karura-2.17.017KARURA_BUILD_BRANCH=release-karura-2.17.018MOONRIVER_BUILD_BRANCH=runtime-230218MOONRIVER_BUILD_BRANCH=runtime-230219SHIDEN_BUILD_BRANCH=v5.4.019SHIDEN_BUILD_BRANCH=v5.4.020QUARTZ_MAINNET_BRANCH=release-v94105520QUARTZ_MAINNET_BRANCH=release-v94105621QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:44321QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443222223UNIQUEWEST_MAINNET_BRANCH=release-v0.9.4223UNIQUEWEST_MAINNET_BRANCH=release-v0.9.4224WESTMINT_BUILD_BRANCH=parachains-v942024WESTMINT_BUILD_BRANCH=parachains-v942025OPAL_MAINNET_BRANCH=release-v94105525OPAL_MAINNET_BRANCH=release-v94205726OPAL_REPLICA_FROM=wss://ws-opal.unique.network:44326OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443272728UNIQUEEAST_MAINNET_BRANCH=release-v0.9.4228UNIQUEEAST_MAINNET_BRANCH=release-v0.9.42tests/src/migrations/942057-appPromotion/lockedToFreeze.tsdiffbeforeafterboth1// import { usingApi, privateKey, onlySign } from "./../../load/lib";1// import { usingApi, privateKey, onlySign } from "./../../load/lib";2import * as fs from 'fs';2import * as fs from 'fs';3import {usingPlaygrounds} from '../../util';3import {usingPlaygrounds} from '../../util';4import path from 'path';4import path, {dirname} from 'path';5import {isInteger, parse} from 'lossless-json';5import {isInteger, parse} from 'lossless-json';6import {fileURLToPath} from 'url';67788const WS_ENDPOINT = 'ws://localhost:9944';9const WS_ENDPOINT = 'ws://localhost:9944';323333 // 3. Parse data to migrate34 // 3. Parse data to migrate34 console.log('3. Parsing chainql results...');35 console.log('3. Parsing chainql results...');36 const dirName = dirname(fileURLToPath(import.meta.url));35 const parsingResult = parse(fs.readFileSync(path.resolve('src', 'migrations', '942057-appPromotion', 'output.json'), 'utf-8'), undefined, customNumberParser);37 const parsingResult = parse(fs.readFileSync(path.resolve(dirName, 'output.json'), 'utf-8'), undefined, customNumberParser);363837 const chainqlImportData = parsingResult as {39 const chainqlImportData = parsingResult as {38 address: string;40 address: string;tests/src/util/frankenstein.tsdiffbeforeafterboth105 }105 }106}106}107108async function skipIfAlreadyUpgraded() {109 await usingPlaygrounds(async (helper) => {110 const specVersion = await getSpecVersion(helper.getApi());111 if(`v${specVersion}` === DESTINATION_SPEC_VERSION) {112 console.log('\n🛸 Current version equal DESTINATION_SPEC_VERSION 🛸');113 console.log("\n🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸");114 }115 }, REPLICA_FROM);116}107117108const raiseZombienet = async (): Promise<void> => {118const raiseZombienet = async (): Promise<void> => {119 await skipIfAlreadyUpgraded();109 const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_PARA_BIN || !!NEW_PARA_WASM;120 const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_PARA_BIN || !!NEW_PARA_WASM;110 /*121 /*111 // If there is nothing to upgrade, what is the point122 // If there is nothing to upgrade, what is the point