From b5e7a28334475ff71422de720e67d1fc48784021 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Wed, 20 Mar 2024 18:48:37 +0200 Subject: [PATCH 1/3] Update deployed version --- proxy/DEPLOYED | 2 +- proxy/migrations/upgradeMainnet.ts | 2 +- proxy/migrations/upgradeSchain.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/DEPLOYED b/proxy/DEPLOYED index 05a40d136..611689143 100644 --- a/proxy/DEPLOYED +++ b/proxy/DEPLOYED @@ -1 +1 @@ -1.5.0-stable.1 +2.1.0-stable.0 diff --git a/proxy/migrations/upgradeMainnet.ts b/proxy/migrations/upgradeMainnet.ts index 7797df38d..8337fe2ab 100644 --- a/proxy/migrations/upgradeMainnet.ts +++ b/proxy/migrations/upgradeMainnet.ts @@ -65,7 +65,7 @@ async function getImaMainnetAbiAndAddress(): Promise { async function main() { const upgrader = new ImaMainnetUpgrader( - "1.5.0", + "2.1.0", await getImaMainnetAbiAndAddress(), contracts ); diff --git a/proxy/migrations/upgradeSchain.ts b/proxy/migrations/upgradeSchain.ts index c5cf1dd31..3c446c1fe 100644 --- a/proxy/migrations/upgradeSchain.ts +++ b/proxy/migrations/upgradeSchain.ts @@ -68,7 +68,7 @@ async function main() { const pathToManifest: string = process.env.MANIFEST || ""; await manifestSetup(pathToManifest); const upgrader = new ImaSchainUpgrader( - "1.5.0", + "2.1.0", await getImaSchainAbiAndAddress(), contracts ); From 209817cdee8f6381d5d4727ebcedfb63f9f8d258 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 22 Mar 2024 17:27:24 +0200 Subject: [PATCH 2/3] Replace localhost network with schain --- proxy/scripts/test_upgrade.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/proxy/scripts/test_upgrade.sh b/proxy/scripts/test_upgrade.sh index 68aec7329..f4fadafa5 100755 --- a/proxy/scripts/test_upgrade.sh +++ b/proxy/scripts/test_upgrade.sh @@ -24,7 +24,7 @@ git clone --branch "$DEPLOYED_TAG" "https://github.com/$GITHUB_REPOSITORY.git" " ACCOUNTS_FILENAME="$DEPLOYED_DIR/proxy/generatedAccounts.json" GANACHE=$(npx ganache \ --😈 \ - --miner.blockGasLimit 9000000 \ + --miner.blockGasLimit 12000000 \ --logging.quiet \ --chain.allowUnlimitedContractSize \ --wallet.accountKeysPath "$ACCOUNTS_FILENAME" \ @@ -35,9 +35,19 @@ yarn install cd proxy PRIVATE_KEY_FOR_ETHEREUM=$(cat "$ACCOUNTS_FILENAME" | jq -r '.private_keys | to_entries | .[8].value') PRIVATE_KEY_FOR_SCHAIN=$(cat "$ACCOUNTS_FILENAME" | jq -r '.private_keys | to_entries | .[9].value') -CHAIN_NAME_SCHAIN="Test" VERSION="$DEPLOYED_VERSION" PRIVATE_KEY_FOR_ETHEREUM="$PRIVATE_KEY_FOR_ETHEREUM" PRIVATE_KEY_FOR_SCHAIN="$PRIVATE_KEY_FOR_SCHAIN" npx hardhat run migrations/deploySkaleManagerComponents.ts --network localhost + +CHAIN_NAME_SCHAIN="Test" \ +VERSION="$DEPLOYED_VERSION" \ +PRIVATE_KEY_FOR_ETHEREUM="$PRIVATE_KEY_FOR_ETHEREUM" \ +PRIVATE_KEY_FOR_SCHAIN="$PRIVATE_KEY_FOR_SCHAIN" \ +npx hardhat run migrations/deploySkaleManagerComponents.ts --network localhost VERSION="$DEPLOYED_VERSION" npx hardhat run migrations/deployMainnet.ts --network localhost -CHAIN_NAME_SCHAIN="Test" VERSION="$DEPLOYED_VERSION" npx hardhat run migrations/deploySchain.ts --network localhost + +CHAIN_NAME_SCHAIN="Test" \ +VERSION="$DEPLOYED_VERSION" \ +URL_W3_S_CHAIN="http://localhost:8545" \ +PRIVATE_KEY_FOR_SCHAIN="$PRIVATE_KEY_FOR_SCHAIN" \ +npx hardhat run migrations/deploySchain.ts --network schain ABI_FILENAME_SCHAIN="proxySchain_Test.json" ABI="data/$ABI_FILENAME_SCHAIN" \ @@ -70,6 +80,8 @@ MANIFEST="data/ima-schain-$DEPLOYED_VERSION-manifest.json" \ CHAIN_NAME_SCHAIN="Test" \ ALLOW_NOT_ATOMIC_UPGRADE="OK" \ VERSION=$VERSION_TAG \ -npx hardhat run migrations/upgradeSchain.ts --network localhost +URL_W3_S_CHAIN="http://localhost:8545" \ +PRIVATE_KEY_FOR_SCHAIN="$PRIVATE_KEY_FOR_SCHAIN" \ +npx hardhat run migrations/upgradeSchain.ts --network schain npx ganache instances stop "$GANACHE" From e685ebec17fad8e38eafafc8ca188eabf8f282c7 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Fri, 22 Mar 2024 17:36:49 +0200 Subject: [PATCH 3/3] Replace localhost with 127.0.0.1 --- proxy/scripts/test_upgrade.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proxy/scripts/test_upgrade.sh b/proxy/scripts/test_upgrade.sh index f4fadafa5..10ae15e09 100755 --- a/proxy/scripts/test_upgrade.sh +++ b/proxy/scripts/test_upgrade.sh @@ -35,6 +35,7 @@ yarn install cd proxy PRIVATE_KEY_FOR_ETHEREUM=$(cat "$ACCOUNTS_FILENAME" | jq -r '.private_keys | to_entries | .[8].value') PRIVATE_KEY_FOR_SCHAIN=$(cat "$ACCOUNTS_FILENAME" | jq -r '.private_keys | to_entries | .[9].value') +URL_W3_S_CHAIN="http://127.0.0.1:8545" CHAIN_NAME_SCHAIN="Test" \ VERSION="$DEPLOYED_VERSION" \ @@ -45,7 +46,7 @@ VERSION="$DEPLOYED_VERSION" npx hardhat run migrations/deployMainnet.ts --networ CHAIN_NAME_SCHAIN="Test" \ VERSION="$DEPLOYED_VERSION" \ -URL_W3_S_CHAIN="http://localhost:8545" \ +URL_W3_S_CHAIN="$URL_W3_S_CHAIN" \ PRIVATE_KEY_FOR_SCHAIN="$PRIVATE_KEY_FOR_SCHAIN" \ npx hardhat run migrations/deploySchain.ts --network schain @@ -80,7 +81,7 @@ MANIFEST="data/ima-schain-$DEPLOYED_VERSION-manifest.json" \ CHAIN_NAME_SCHAIN="Test" \ ALLOW_NOT_ATOMIC_UPGRADE="OK" \ VERSION=$VERSION_TAG \ -URL_W3_S_CHAIN="http://localhost:8545" \ +URL_W3_S_CHAIN="$URL_W3_S_CHAIN" \ PRIVATE_KEY_FOR_SCHAIN="$PRIVATE_KEY_FOR_SCHAIN" \ npx hardhat run migrations/upgradeSchain.ts --network schain