From 93377536f7cdfef35a21a76da40624ed14ed7868 Mon Sep 17 00:00:00 2001 From: Dmytro Stebaiev Date: Thu, 1 Dec 2022 19:41:05 +0200 Subject: [PATCH] Update deployed version --- proxy/DEPLOYED | 2 +- proxy/migrations/upgradeMainnet.ts | 69 +----------------------------- 2 files changed, 3 insertions(+), 68 deletions(-) diff --git a/proxy/DEPLOYED b/proxy/DEPLOYED index a939f53a1..8c9698aaf 100644 --- a/proxy/DEPLOYED +++ b/proxy/DEPLOYED @@ -1 +1 @@ -1.3.2-stable.1 \ No newline at end of file +1.3.4 \ No newline at end of file diff --git a/proxy/migrations/upgradeMainnet.ts b/proxy/migrations/upgradeMainnet.ts index 1cdb09380..3ca1967c1 100644 --- a/proxy/migrations/upgradeMainnet.ts +++ b/proxy/migrations/upgradeMainnet.ts @@ -9,75 +9,10 @@ import hre from "hardhat"; async function main() { await upgrade( - "1.3.2", + "1.3.4", contracts, async (safeTransactions, abi) => undefined, - async (safeTransactions, abi) => { - const proxyAdmin = await getManifestAdmin(hre); - const owner = await proxyAdmin.owner(); - const communityPoolName = "CommunityPool"; - const communityPoolFactory = await ethers.getContractFactory(communityPoolName); - const communityPoolAddress = abi[getContractKeyInAbiFile(communityPoolName) + "_address"]; - let communityPool; - if (communityPoolAddress) { - communityPool = communityPoolFactory.attach(communityPoolAddress) as CommunityPool; - const constantSetterRole = await communityPool.CONSTANT_SETTER_ROLE(); - const isHasRole = await communityPool.hasRole(constantSetterRole, owner); - if (!isHasRole) { - console.log(chalk.yellow("Prepare transaction to grantRole CONSTANT_SETTER_ROLE to " + owner)); - safeTransactions.push(encodeTransaction( - 0, - communityPoolAddress, - 0, - communityPool.interface.encodeFunctionData("grantRole", [constantSetterRole, owner]) - )); - } - console.log(chalk.yellow("Prepare transaction to set multiplier to 3/2")); - safeTransactions.push(encodeTransaction( - 0, - communityPoolAddress, - 0, - communityPool.interface.encodeFunctionData("setMultiplier", [3, 2]) - )); - console.log(chalk.yellow("Prepare transaction to set header message gas cost to 73800")); - } else { - console.log(chalk.red("CommunityPool was not found!")); - console.log(chalk.red("Check your abi!!!")); - process.exit(1); - } - - const messageProxyForMainnet = (await ethers.getContractFactory("MessageProxyForMainnet")) - .attach(abi[getContractKeyInAbiFile("MessageProxyForMainnet") + "_address"]) as MessageProxyForMainnet; - - if (! await messageProxyForMainnet.hasRole(await messageProxyForMainnet.CONSTANT_SETTER_ROLE(), owner)) { - console.log(chalk.yellow("Prepare transaction to grantRole CONSTANT_SETTER_ROLE to " + owner)); - safeTransactions.push(encodeTransaction( - 0, - messageProxyForMainnet.address, - 0, - messageProxyForMainnet.interface.encodeFunctionData( - "grantRole", - [ await messageProxyForMainnet.CONSTANT_SETTER_ROLE(), owner ] - ) - )); - } - - const newHeaderMessageGasCost = 92251; - - console.log(chalk.yellow( - "Prepare transaction to set header message gas cost to", - newHeaderMessageGasCost.toString() - )); - safeTransactions.push(encodeTransaction( - 0, - messageProxyForMainnet.address, - 0, - messageProxyForMainnet.interface.encodeFunctionData( - "setNewHeaderMessageGasCost", - [ newHeaderMessageGasCost ] - ) - )); - }, + async (safeTransactions, abi) => undefined, "proxyMainnet" ); }