Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upgrade check #1692

Merged
merged 7 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proxy/DEPLOYED
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.0-stable.1
2.1.0-stable.0
2 changes: 1 addition & 1 deletion proxy/migrations/upgradeMainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async function getImaMainnetAbiAndAddress(): Promise<SkaleABIFile> {

async function main() {
const upgrader = new ImaMainnetUpgrader(
"1.5.0",
"2.1.0",
await getImaMainnetAbiAndAddress(),
contracts
);
Expand Down
2 changes: 1 addition & 1 deletion proxy/migrations/upgradeSchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down
21 changes: 17 additions & 4 deletions proxy/scripts/test_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -35,9 +35,20 @@ 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
URL_W3_S_CHAIN="http://127.0.0.1:8545"

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="$URL_W3_S_CHAIN" \
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" \
Expand Down Expand Up @@ -70,6 +81,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="$URL_W3_S_CHAIN" \
PRIVATE_KEY_FOR_SCHAIN="$PRIVATE_KEY_FOR_SCHAIN" \
npx hardhat run migrations/upgradeSchain.ts --network schain

npx ganache instances stop "$GANACHE"
Loading