git.delta.rocks / unique-network / refs/commits / c656b7b0d499

difftreelog

add 942057 migration scripts

Max Andreev2023-06-09parent: #cd2a1cb.patch.diff
in: master

5 files changed

addedtests/src/migrations/942057-appPromotion/collect-data.shdiffbeforeafterboth

no changes

addedtests/src/migrations/942057-appPromotion/collectData.tsdiffbeforeafterboth

no changes

modifiedtests/src/migrations/942057-appPromotion/correctStateAfterMaintenance.tsdiffbeforeafterboth
4949
50 const failedBlocks: bigint[] = [];50 const failedBlocks: bigint[] = [];
51 let isSuccess = true;51 let isSuccess = true;
52 await helper.wait.newBlocks(1);
5352
54 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) {
addedtests/src/migrations/942057-appPromotion/index.tsdiffbeforeafterboth

no changes

modifiedtests/src/migrations/942057-appPromotion/lockedToFreeze.tsdiffbeforeafterboth
13 return isInteger(value) ? BigInt(value) : parseFloat(value);13 return isInteger(value) ? BigInt(value) : parseFloat(value);
14}14}
1515
16const 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};
257257
258main({
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 });