difftreelog
add 942057 migration scripts
in: master
5 files changed
tests/src/migrations/942057-appPromotion/collect-data.shdiffbeforeafterbothno changes
tests/src/migrations/942057-appPromotion/collectData.tsdiffbeforeafterbothno changes
tests/src/migrations/942057-appPromotion/correctStateAfterMaintenance.tsdiffbeforeafterboth494950 const failedBlocks: bigint[] = [];50 const failedBlocks: bigint[] = [];51 let isSuccess = true;51 let isSuccess = true;52 await helper.wait.newBlocks(1);535254 for(const b of filteredBlocks) {53 for(const b of filteredBlocks) {55 if(((await api.query.appPromotion.pendingUnstake(b)).toJSON() as any[]).length != 0) {54 if(((await api.query.appPromotion.pendingUnstake(b)).toJSON() as any[]).length != 0) {tests/src/migrations/942057-appPromotion/index.tsdiffbeforeafterbothno changes
tests/src/migrations/942057-appPromotion/lockedToFreeze.tsdiffbeforeafterboth13 return isInteger(value) ? BigInt(value) : parseFloat(value);13 return isInteger(value) ? BigInt(value) : parseFloat(value);14}14}151516const main = async(options: { wsEndpoint: string; donorSeed: string } = {16export const migrateLockedToFreeze = async(options: { wsEndpoint: string; donorSeed: string } = {17 wsEndpoint: WS_ENDPOINT,17 wsEndpoint: WS_ENDPOINT,18 donorSeed: DONOR_SEED,18 donorSeed: DONOR_SEED,19}) => {19}) => {255 console.log('Chainql data correct');255 console.log('Chainql data correct');256};256};257257258main({259 wsEndpoint: process.env.WS_RPC!,260 donorSeed: process.env.SUPERUSER_SEED!,261}).then(() => process.exit(0))262 .catch((e) => {263 console.error(e);264 process.exit(1);265 });