From 1436f703f232b11457297b8a6a1ba97bc64f5269 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:25:24 +0530 Subject: [PATCH] fix: remove unnecessary action and fix variable name --- simulations/vip-170/vip-170-testnet/simulations.ts | 4 ++-- simulations/vip-171/vip-171-testnet/simulations.ts | 6 +++--- vips/vip-170/vip-170-testnet.ts | 4 ++-- vips/vip-171/vip-171-testnet.ts | 10 ++-------- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/simulations/vip-170/vip-170-testnet/simulations.ts b/simulations/vip-170/vip-170-testnet/simulations.ts index ba81db342..6c22f6556 100644 --- a/simulations/vip-170/vip-170-testnet/simulations.ts +++ b/simulations/vip-170/vip-170-testnet/simulations.ts @@ -16,7 +16,7 @@ import VTOKEN_ABI from "./abi/VTOKEN_ABI.json"; const VTOKEN_BEACON = "0xBF85A90673E61956f8c79b9150BAB7893b791bDd"; const NEW_IMPL_VTOKEN = "0x37130dd8181477Be3dDe8b22A32FE302ca602BA7"; const NORMAL_TIMELOCK = "0xce10739590001705F7FF231611ba4A48B2820327"; -const TREASURY = "0x8b293600C50D6fbdc6Ed4251cc75ECe29880276f"; +const PROTOCOL_SHARE_RESERVE = "0x8b293600C50D6fbdc6Ed4251cc75ECe29880276f"; let vToken: ethers.Contract; let underlying: ethers.Contract; @@ -113,7 +113,7 @@ forking(33043237, () => { delete state.protocolShareReserve; delete state.totalReserves; - expect(await vToken.protocolShareReserve()).equals(TREASURY); + expect(await vToken.protocolShareReserve()).equals(PROTOCOL_SHARE_RESERVE); postVipStorage.push(state); }); } diff --git a/simulations/vip-171/vip-171-testnet/simulations.ts b/simulations/vip-171/vip-171-testnet/simulations.ts index 171b47b0c..9c3db6519 100644 --- a/simulations/vip-171/vip-171-testnet/simulations.ts +++ b/simulations/vip-171/vip-171-testnet/simulations.ts @@ -14,7 +14,7 @@ import VTOKEN_ABI from "./abi/VTOKEN_ABI.json"; const NEW_VBEP20_DELEGATE_IMPL = "0xAC5CFaC96871f35f7ce4eD2b46484Db34B548b40"; const NORMAL_TIMELOCK = "0xce10739590001705F7FF231611ba4A48B2820327"; -const TREASURY = "0x8b293600C50D6fbdc6Ed4251cc75ECe29880276f"; +const PROTOCOL_SHARE_RESERVE = "0x8b293600C50D6fbdc6Ed4251cc75ECe29880276f"; const ACCESS_CONTROL_MANAGER = "0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA"; let vToken: ethers.Contract; @@ -34,7 +34,7 @@ forking(33155924, () => { before(async () => { [user] = await ethers.getSigners(); impersonatedTimelock = await initMainnetUser(NORMAL_TIMELOCK, ethers.utils.parseEther("3")); - await mine(CORE_MARKETS.length * 4 + 4); // Number of Vip steps + await mine(CORE_MARKETS.length * 4 + 3); // Number of Vip steps }); for (const market of CORE_MARKETS) { it(`Save pre VIP storage snapshot of ${market.name}`, async () => { @@ -138,7 +138,7 @@ forking(33155924, () => { delete state.owner; expect(await vToken.implementation()).equals(NEW_VBEP20_DELEGATE_IMPL); - expect(await vToken.protocolShareReserve()).equals(TREASURY); + expect(await vToken.protocolShareReserve()).equals(PROTOCOL_SHARE_RESERVE); expect(await vToken.accessControlManager()).equals(ACCESS_CONTROL_MANAGER); expect(await vToken.admin()).equals(NORMAL_TIMELOCK); diff --git a/vips/vip-170/vip-170-testnet.ts b/vips/vip-170/vip-170-testnet.ts index e443eec5b..c4153dd19 100644 --- a/vips/vip-170/vip-170-testnet.ts +++ b/vips/vip-170/vip-170-testnet.ts @@ -7,7 +7,7 @@ const VTOKEN_BEACON = "0xBF85A90673E61956f8c79b9150BAB7893b791bDd"; const NEW_IMPL_VTOKEN = "0x37130dd8181477Be3dDe8b22A32FE302ca602BA7"; const ACCESS_CONTROL_MANAGER = "0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA"; const NORMAL_TIMELOCK = "0xce10739590001705F7FF231611ba4A48B2820327"; -const TREASURY = "0x8b293600c50d6fbdc6ed4251cc75ece29880276f"; +const PROTOCOL_SHARE_RESERVE = "0x8b293600c50d6fbdc6ed4251cc75ece29880276f"; interface AssetConfig { name: string; @@ -161,7 +161,7 @@ export const vip170Testnet = () => { return { target: asset.address, signature: "setProtocolShareReserve(address)", - params: [TREASURY], + params: [PROTOCOL_SHARE_RESERVE], }; }), ], diff --git a/vips/vip-171/vip-171-testnet.ts b/vips/vip-171/vip-171-testnet.ts index bf34f9ff2..9936b72fb 100644 --- a/vips/vip-171/vip-171-testnet.ts +++ b/vips/vip-171/vip-171-testnet.ts @@ -6,7 +6,7 @@ import { makeProposal } from "../../src/utils"; const NEW_VBEP20_DELEGATE_IMPL = "0xAC5CFaC96871f35f7ce4eD2b46484Db34B548b40"; const ACCESS_CONTROL_MANAGER = "0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA"; const NORMAL_TIMELOCK = "0xce10739590001705F7FF231611ba4A48B2820327"; -const TREASURY = "0x8b293600c50d6fbdc6ed4251cc75ece29880276f"; +const PROTOCOL_SHARE_RESERVE = "0x8b293600c50d6fbdc6ed4251cc75ece29880276f"; interface AssetConfig { name: string; @@ -101,12 +101,6 @@ export const vip171Testnet = () => { params: [ethers.constants.AddressZero, "setReduceReservesBlockDelta(uint256)", NORMAL_TIMELOCK], }, - { - target: ACCESS_CONTROL_MANAGER, - signature: "giveCallPermission(address,string,address)", - params: [ethers.constants.AddressZero, "setProtocolShareReserve(address)", NORMAL_TIMELOCK], - }, - ...CORE_MARKETS.map(asset => { return { target: asset.address, @@ -119,7 +113,7 @@ export const vip171Testnet = () => { return { target: asset.address, signature: "setProtocolShareReserve(address)", - params: [TREASURY], + params: [PROTOCOL_SHARE_RESERVE], }; }), ],