Skip to content

Commit

Permalink
Merge pull request #1021 from UniqueNetwork/fix/propose-upgrade-script
Browse files Browse the repository at this point in the history
fix: enable maintenance mode during upgrade
  • Loading branch information
CertainLach authored Oct 19, 2023
2 parents 01c5056 + 340647b commit 35c1755
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/src/proposeupgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ async function main() {
const wasmFileHash = blake2AsHex(wasmFileBytes, 256);

const authorizeUpgrade = api.tx.parachainSystem.authorizeUpgrade(wasmFileHash, true);
const enableMaintenance = api.tx.maintenance.enable();

const councilMembers = (await api.query.council.members()).toJSON() as any[];
const councilProposalThreshold = Math.floor(councilMembers.length / 2) + 1;

const democracyProposal = api.tx.democracy.externalProposeDefault({
Inline: authorizeUpgrade.method.toHex(),
Inline: api.tx.utility.batchAll([
authorizeUpgrade.method.toHex(),
enableMaintenance.method.toHex(),
]).method.toHex(),
});

const councilProposal = api.tx.council.propose(
Expand Down

0 comments on commit 35c1755

Please sign in to comment.