Skip to content

Commit

Permalink
fix: fixed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
web3rover committed Dec 20, 2024
1 parent 20c23b8 commit 4dc2131
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 72 deletions.
6 changes: 2 additions & 4 deletions simulations/vip-502/arbitrumone.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
24 changes: 9 additions & 15 deletions simulations/vip-502/basemainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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;
Expand All @@ -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());
});

Expand Down
15 changes: 8 additions & 7 deletions simulations/vip-502/basesepolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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 () => {
Expand All @@ -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);

Expand Down
5 changes: 1 addition & 4 deletions simulations/vip-502/bscmainnet.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
6 changes: 2 additions & 4 deletions simulations/vip-502/ethereum.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
6 changes: 2 additions & 4 deletions simulations/vip-502/opbnbmainnet.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion simulations/vip-502/opmainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion simulations/vip-502/zksyncmainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
27 changes: 11 additions & 16 deletions vips/vip-502/bscmainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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[] = [
Expand Down Expand Up @@ -146,7 +141,7 @@ const vip502 = () => {
dstChainId: LzChainId.basemainnet,
},
{
target: XVS_BRIDGE_ADMIN,
target: XVS_BRIDGE_ADMIN_PROXY,
signature: "acceptOwnership()",
params: [],
dstChainId: LzChainId.basemainnet,
Expand Down
27 changes: 11 additions & 16 deletions vips/vip-502/bsctestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down Expand Up @@ -87,7 +82,7 @@ const vip502 = () => {
dstChainId: LzChainId.basesepolia,
},
{
target: XVS_BRIDGE_ADMIN,
target: XVS_BRIDGE_ADMIN_PROXY,
signature: "acceptOwnership()",
params: [],
dstChainId: LzChainId.basesepolia,
Expand Down

0 comments on commit 4dc2131

Please sign in to comment.