From 4dc213122ec2aa3f2b4bc3a4d5bc386a7b076857 Mon Sep 17 00:00:00 2001 From: web3rover Date: Fri, 20 Dec 2024 16:18:52 +0530 Subject: [PATCH] fix: fixed comments --- simulations/vip-502/arbitrumone.ts | 6 ++---- simulations/vip-502/basemainnet.ts | 24 +++++++++--------------- simulations/vip-502/basesepolia.ts | 15 ++++++++------- simulations/vip-502/bscmainnet.ts | 5 +---- simulations/vip-502/ethereum.ts | 6 ++---- simulations/vip-502/opbnbmainnet.ts | 6 ++---- simulations/vip-502/opmainnet.ts | 2 +- simulations/vip-502/zksyncmainnet.ts | 2 +- vips/vip-502/bscmainnet.ts | 27 +++++++++++---------------- vips/vip-502/bsctestnet.ts | 27 +++++++++++---------------- 10 files changed, 48 insertions(+), 72 deletions(-) diff --git a/simulations/vip-502/arbitrumone.ts b/simulations/vip-502/arbitrumone.ts index 338af1ac8..e384aef28 100644 --- a/simulations/vip-502/arbitrumone.ts +++ b/simulations/vip-502/arbitrumone.ts @@ -1,14 +1,12 @@ import { NETWORK_ADDRESSES } from "src/networkAddresses"; import { LzChainId } from "src/types"; -import { forking, testForkedNetworkVipCommands } from "src/vip-framework"; +import { forking } from "src/vip-framework"; -import vip407 from "../../vips/vip-407/bscmainnet"; import vip502, { BASE_MAINNET_TRUSTED_REMOTE, remoteBridgeEntries } from "../../vips/vip-502/bscmainnet"; import { RemoteBridgeEntry } from "../../vips/vip-502/bscmainnet"; import { checkXVSBridge } from "./checkXVSBridge"; -forking(285966125, async () => { - await testForkedNetworkVipCommands("vip500", await vip407()); +forking(286705657, async () => { await checkXVSBridge( LzChainId.basemainnet, NETWORK_ADDRESSES.arbitrumone, diff --git a/simulations/vip-502/basemainnet.ts b/simulations/vip-502/basemainnet.ts index c7b5b7060..1035c97a9 100644 --- a/simulations/vip-502/basemainnet.ts +++ b/simulations/vip-502/basemainnet.ts @@ -5,19 +5,18 @@ import { ethers } from "hardhat"; import { NETWORK_ADDRESSES } from "src/networkAddresses"; import { forking, pretendExecutingVip, testForkedNetworkVipCommands } from "src/vip-framework"; -import vip003, { PSR } from "../../multisig/proposals/basemainnet/vip-003"; -import vip004 from "../../multisig/proposals/basemainnet/vip-004"; -import vip005 from "../../multisig/proposals/basemainnet/vip-005"; -import vip006 from "../../multisig/proposals/basemainnet/vip-006"; +import { PSR } from "../../multisig/proposals/basemainnet/vip-003"; import vip007 from "../../multisig/proposals/basemainnet/vip-007"; -import { PLP, PRIME } from "../../multisig/proposals/basemainnet/vip-007"; -import vip502, { +import { BOUND_VALIDATOR, COMPTROLLERS, + PLP, + PRIME, VTOKENS, - XVS_BRIDGE_ADMIN, + XVS_BRIDGE_ADMIN_PROXY, XVS_STORE, -} from "../../vips/vip-502/bscmainnet"; +} from "../../multisig/proposals/basemainnet/vip-007"; +import vip502 from "../../vips/vip-502/bscmainnet"; import COMPTROLLER_ABI from "../vip-502/abi/Comptroller.json"; import PRIME_ABI from "../vip-502/abi/Prime.json"; import PRIME_LIQUIDITY_PROVIDER_ABI from "../vip-502/abi/PrimeLiquidityProvider.json"; @@ -34,7 +33,7 @@ import POOL_REGISTRY_ABI from "./abi/PoolRegistry.json"; const { basemainnet } = NETWORK_ADDRESSES; -forking(23908020, async () => { +forking(23950456, async () => { const provider = ethers.provider; let prime: Contract; let plp: Contract; @@ -59,18 +58,13 @@ forking(23908020, async () => { redstoneOracle = new ethers.Contract(basemainnet.REDSTONE_ORACLE, CHAINLINK_ORACLE_ABI, provider); resilientOracle = new ethers.Contract(basemainnet.RESILIENT_ORACLE, RESILLIENT_ORACLE_ABI, provider); boundValidator = new ethers.Contract(BOUND_VALIDATOR, BOUND_VALIDATOR_ABI, provider); - xvsBridgeAdmin = await ethers.getContractAt(XVS_BRIDGE_ADMIN_ABI, XVS_BRIDGE_ADMIN); + xvsBridgeAdmin = await ethers.getContractAt(XVS_BRIDGE_ADMIN_ABI, XVS_BRIDGE_ADMIN_PROXY); treasury = await ethers.getContractAt( TREASURY_ABI, basemainnet.VTREASURY, await ethers.getSigner(basemainnet.NORMAL_TIMELOCK), ); poolRegistry = await ethers.getContractAt(POOL_REGISTRY_ABI, basemainnet.POOL_REGISTRY); - - await pretendExecutingVip(await vip003()); - await pretendExecutingVip(await vip004()); - await pretendExecutingVip(await vip005()); - await pretendExecutingVip(await vip006()); await pretendExecutingVip(await vip007()); }); diff --git a/simulations/vip-502/basesepolia.ts b/simulations/vip-502/basesepolia.ts index e50866bf1..21e10e742 100644 --- a/simulations/vip-502/basesepolia.ts +++ b/simulations/vip-502/basesepolia.ts @@ -5,16 +5,15 @@ import { NETWORK_ADDRESSES } from "src/networkAddresses"; import { forking, pretendExecutingVip, testForkedNetworkVipCommands } from "src/vip-framework"; import { PSR } from "../../multisig/proposals/basesepolia/vip-003"; -import vip007 from "../../multisig/proposals/basesepolia/vip-007"; -import { PLP, PRIME } from "../../multisig/proposals/basesepolia/vip-007"; -import vip502, { +import vip007, { BOUND_VALIDATOR, COMPTROLLERS, VTOKENS, - XVS_BRIDGE, - XVS_BRIDGE_ADMIN, + XVS_BRIDGE_ADMIN_PROXY, XVS_STORE, -} from "../../vips/vip-502/bsctestnet"; +} from "../../multisig/proposals/basesepolia/vip-007"; +import { PLP, PRIME } from "../../multisig/proposals/basesepolia/vip-007"; +import vip502 from "../../vips/vip-502/bsctestnet"; import COMPTROLLER_ABI from "../vip-502/abi/Comptroller.json"; import PRIME_ABI from "../vip-502/abi/Prime.json"; import PRIME_LIQUIDITY_PROVIDER_ABI from "../vip-502/abi/PrimeLiquidityProvider.json"; @@ -29,6 +28,8 @@ import TREASURY_ABI from "../vip-502/abi/treasury.json"; import XVS_BRIDGE_ABI from "../vip-502/abi/xvsBridge.json"; import XVS_BRIDGE_ADMIN_ABI from "../vip-502/abi/xvsBridgeAdmin.json"; +const XVS_BRIDGE = "0xD5Cd1fD17B724a391C1bce55Eb9d88E3205eED60"; + const { basesepolia } = NETWORK_ADDRESSES; forking(19374669, async () => { @@ -52,7 +53,7 @@ forking(19374669, async () => { redstoneOracle = new ethers.Contract(basesepolia.REDSTONE_ORACLE, CHAINLINK_ORACLE_ABI, provider); resilientOracle = new ethers.Contract(basesepolia.RESILIENT_ORACLE, RESILLIENT_ORACLE_ABI, provider); boundValidator = new ethers.Contract(BOUND_VALIDATOR, BOUND_VALIDATOR_ABI, provider); - xvsBridgeAdmin = await ethers.getContractAt(XVS_BRIDGE_ADMIN_ABI, XVS_BRIDGE_ADMIN); + xvsBridgeAdmin = await ethers.getContractAt(XVS_BRIDGE_ADMIN_ABI, XVS_BRIDGE_ADMIN_PROXY); xvsBridge = await ethers.getContractAt(XVS_BRIDGE_ABI, XVS_BRIDGE); treasury = await ethers.getContractAt(TREASURY_ABI, basesepolia.VTREASURY); diff --git a/simulations/vip-502/bscmainnet.ts b/simulations/vip-502/bscmainnet.ts index 894fe8545..376f1a7d7 100644 --- a/simulations/vip-502/bscmainnet.ts +++ b/simulations/vip-502/bscmainnet.ts @@ -1,12 +1,9 @@ import { expectEvents } from "../../src/utils"; import { forking, testVip } from "../../src/vip-framework"; -import vip408 from "../../vips/vip-408/bscmainnet"; import vip502 from "../../vips/vip-502/bscmainnet"; import OMNICHAIN_PROPOSAL_SENDER_ABI from "../vip-502/abi/OmnichainProposalSender.json"; -forking(44978531, async () => { - testVip("VIP-408 Multichain Governance", await vip408(), {}); - +forking(45036507, async () => { testVip("VIP-502 Transfer ownership to Governance", await vip502(), { callbackAfterExecution: async txResponse => { await expectEvents( diff --git a/simulations/vip-502/ethereum.ts b/simulations/vip-502/ethereum.ts index 248c7c0cb..203eeeb83 100644 --- a/simulations/vip-502/ethereum.ts +++ b/simulations/vip-502/ethereum.ts @@ -1,14 +1,12 @@ import { NETWORK_ADDRESSES } from "src/networkAddresses"; import { LzChainId } from "src/types"; -import { forking, testForkedNetworkVipCommands } from "src/vip-framework"; +import { forking } from "src/vip-framework"; -import vip407 from "../../vips/vip-407/bscmainnet"; import vip502, { BASE_MAINNET_TRUSTED_REMOTE, remoteBridgeEntries } from "../../vips/vip-502/bscmainnet"; import { RemoteBridgeEntry } from "../../vips/vip-502/bscmainnet"; import { checkXVSBridge } from "./checkXVSBridge"; -forking(21427765, async () => { - await testForkedNetworkVipCommands("vip407", await vip407()); +forking(21443142, async () => { await checkXVSBridge( LzChainId.basemainnet, NETWORK_ADDRESSES.ethereum, diff --git a/simulations/vip-502/opbnbmainnet.ts b/simulations/vip-502/opbnbmainnet.ts index e1803ddf1..2aeb57fec 100644 --- a/simulations/vip-502/opbnbmainnet.ts +++ b/simulations/vip-502/opbnbmainnet.ts @@ -1,14 +1,12 @@ import { NETWORK_ADDRESSES } from "src/networkAddresses"; import { LzChainId } from "src/types"; -import { forking, testForkedNetworkVipCommands } from "src/vip-framework"; +import { forking } from "src/vip-framework"; -import vip407 from "../../vips/vip-407/bscmainnet"; import vip502, { BASE_MAINNET_TRUSTED_REMOTE, remoteBridgeEntries } from "../../vips/vip-502/bscmainnet"; import { RemoteBridgeEntry } from "../../vips/vip-502/bscmainnet"; import { checkXVSBridge } from "./checkXVSBridge"; -forking(42751317, async () => { - await testForkedNetworkVipCommands("vip500", await vip407()); +forking(42936962, async () => { await checkXVSBridge( LzChainId.basemainnet, NETWORK_ADDRESSES.opbnbmainnet, diff --git a/simulations/vip-502/opmainnet.ts b/simulations/vip-502/opmainnet.ts index 6a8604a95..8f38f611b 100644 --- a/simulations/vip-502/opmainnet.ts +++ b/simulations/vip-502/opmainnet.ts @@ -8,7 +8,7 @@ import vip502, { BASE_MAINNET_TRUSTED_REMOTE, remoteBridgeEntries } from "../../ import { RemoteBridgeEntry } from "../../vips/vip-502/bscmainnet"; import { checkXVSBridge } from "./checkXVSBridge"; -forking(129453114, async () => { +forking(129545958, async () => { before(async () => { const ONE_YEAR = 31536000; const XVS_REDSTONE_FEED = "0x414F8f961969A8131AbE53294600c6C515E68f81"; diff --git a/simulations/vip-502/zksyncmainnet.ts b/simulations/vip-502/zksyncmainnet.ts index 994ceb759..bbcdeaf4f 100644 --- a/simulations/vip-502/zksyncmainnet.ts +++ b/simulations/vip-502/zksyncmainnet.ts @@ -8,7 +8,7 @@ import vip502, { BASE_MAINNET_TRUSTED_REMOTE, remoteBridgeEntries } from "../../ import { RemoteBridgeEntry } from "../../vips/vip-502/bscmainnet"; import { checkXVSBridge } from "./checkXVSBridge"; -forking(51574026, async () => { +forking(51746733, async () => { before(async () => { const ONE_YEAR = 31536000; const XVS_REDSTONE_FEED = "0xca4793Eeb7a837E30884279b3D557970E444EBDe"; diff --git a/vips/vip-502/bscmainnet.ts b/vips/vip-502/bscmainnet.ts index 4fea568d4..ac9afaa65 100644 --- a/vips/vip-502/bscmainnet.ts +++ b/vips/vip-502/bscmainnet.ts @@ -3,7 +3,16 @@ import { LzChainId, ProposalType } from "src/types"; import { makeProposal } from "src/utils"; import { PSR } from "../../multisig/proposals/basemainnet/vip-003"; -import { PLP, PRIME } from "../../multisig/proposals/basemainnet/vip-007"; +import { + BOUND_VALIDATOR, + COMPTROLLERS, + PLP, + POOL_REGISTRY, + PRIME, + VTOKENS, + XVS_BRIDGE_ADMIN_PROXY, + XVS_STORE, +} from "../../multisig/proposals/basemainnet/vip-007"; export type RemoteBridgeEntry = { bridgeAdmin: string; @@ -18,20 +27,6 @@ export type RemoteBridgeCommand = { dstChainId: LzChainId | undefined; }; -export const BOUND_VALIDATOR = "0x66dDE062D3DC1BB5223A0096EbB89395d1f11DB0"; -export const POOL_REGISTRY = "0xeef902918DdeCD773D4B422aa1C6e1673EB9136F"; -export const VTOKENS = [ - "0x3cb752d175740043Ec463673094e06ACDa2F9a2e", - "0xEB8A79bD44cF4500943bf94a2b4434c95C008599", - "0x7bBd1005bB24Ec84705b04e1f2DfcCad533b6D72", -]; -export const COMPTROLLERS = ["0x0C7973F9598AA62f9e03B94E92C967fD5437426C"]; -export const XVS_STORE = "0x11b084Cfa559a82AAC0CcD159dBea27899c7955A"; -export const XVS_BRIDGE_ADMIN = "0x6303FEcee7161bF959d65df4Afb9e1ba5701f78e"; -export const XVS_BRIDGE = "0x3dD92fB51a5d381Ae78E023dfB5DD1D45D2426Cd"; - -export const DEFAULT_ADMIN_ROLE = "0x0000000000000000000000000000000000000000000000000000000000000000"; - export const BASE_MAINNET_TRUSTED_REMOTE = "0x3dD92fB51a5d381Ae78E023dfB5DD1D45D2426Cd"; export const remoteBridgeEntries: RemoteBridgeEntry[] = [ @@ -146,7 +141,7 @@ const vip502 = () => { dstChainId: LzChainId.basemainnet, }, { - target: XVS_BRIDGE_ADMIN, + target: XVS_BRIDGE_ADMIN_PROXY, signature: "acceptOwnership()", params: [], dstChainId: LzChainId.basemainnet, diff --git a/vips/vip-502/bsctestnet.ts b/vips/vip-502/bsctestnet.ts index 7d8d67957..4d93a96ed 100644 --- a/vips/vip-502/bsctestnet.ts +++ b/vips/vip-502/bsctestnet.ts @@ -3,21 +3,16 @@ import { LzChainId, ProposalType } from "src/types"; import { makeProposal } from "src/utils"; import { PSR } from "../../multisig/proposals/basesepolia/vip-003"; -import { PLP, PRIME } from "../../multisig/proposals/basesepolia/vip-007"; - -export const BOUND_VALIDATOR = "0xC76284488E57554A457A75a8b166fB2ADAB430dB"; -export const POOL_REGISTRY = "0xCa330282BEeb07a81963336d0bf8f5f34317916c"; -export const VTOKENS = [ - "0x776f14D624aBdAfa912d6Cd0864976DdaF5Ca4a7", - "0x436E5A07F58AAA86277e8b992bC3e596eC423d09", - "0xA31D67c056Aadc2501535f2776bF1157904f810e", -]; -export const COMPTROLLERS = ["0x272795dd6c5355CF25765F36043F34014454Eb5b"]; -export const XVS_STORE = "0x059f1eA3973738C649d63bF4dA18221ecA418cDC"; -export const XVS_BRIDGE_ADMIN = "0xE431E82d8fFfd81E7c082BeC7Fe2C306f5c988aD"; -export const XVS_BRIDGE = "0xD5Cd1fD17B724a391C1bce55Eb9d88E3205eED60"; - -export const DEFAULT_ADMIN_ROLE = "0x0000000000000000000000000000000000000000000000000000000000000000"; +import { + BOUND_VALIDATOR, + COMPTROLLERS, + PLP, + POOL_REGISTRY, + PRIME, + VTOKENS, + XVS_BRIDGE_ADMIN_PROXY, + XVS_STORE, +} from "../../multisig/proposals/basesepolia/vip-007"; const basesepolia = NETWORK_ADDRESSES.basesepolia; const vip502 = () => { @@ -87,7 +82,7 @@ const vip502 = () => { dstChainId: LzChainId.basesepolia, }, { - target: XVS_BRIDGE_ADMIN, + target: XVS_BRIDGE_ADMIN_PROXY, signature: "acceptOwnership()", params: [], dstChainId: LzChainId.basesepolia,