From 61d839fddfd369fc11007c9801d0b06fc0f4f918 Mon Sep 17 00:00:00 2001 From: Vadim Yavorsky Date: Thu, 21 Nov 2024 13:51:17 +0000 Subject: [PATCH] Add UPGRADE_ALL env for schains upgrade --- migrations/upgradeSchain.ts | 5 +++++ scripts/test_upgrade.sh | 1 + 2 files changed, 6 insertions(+) diff --git a/migrations/upgradeSchain.ts b/migrations/upgradeSchain.ts index 57f8ea942..1814a81a3 100644 --- a/migrations/upgradeSchain.ts +++ b/migrations/upgradeSchain.ts @@ -92,6 +92,11 @@ async function updateAbi(contracts: string[]) { async function main() { const pathToManifest: string = process.env.MANIFEST || ""; await manifestSetup(pathToManifest); + let contractNamesToUpgrade = [ + ] + if (process.env.UPGRADE_ALL) { + contractNamesToUpgrade = contracts; + } const upgrader = new ImaSchainUpgrader( "2.1.0", await getImaSchainInstance(), diff --git a/scripts/test_upgrade.sh b/scripts/test_upgrade.sh index ada74dd73..93201338f 100755 --- a/scripts/test_upgrade.sh +++ b/scripts/test_upgrade.sh @@ -87,6 +87,7 @@ MESSAGE_PROXY_FOR_SCHAIN=$(cat data/$ABI_FILENAME_SCHAIN | jq -r .message_proxy_ # ABI="data/$ABI_FILENAME_SCHAIN" \ # MANIFEST="data/ima-schain-$DEPLOYED_VERSION-manifest.json" \ # CHAIN_NAME_SCHAIN="Test" \ +# UPGRADE_ALL=true \ # ALLOW_NOT_ATOMIC_UPGRADE="OK" \ # TARGET="$MESSAGE_PROXY_FOR_SCHAIN" \ # VERSION=$VERSION_TAG \