diff --git a/src/networkAddresses.ts b/src/networkAddresses.ts index 19f8bacf4..f52b99c36 100644 --- a/src/networkAddresses.ts +++ b/src/networkAddresses.ts @@ -27,7 +27,9 @@ export const NETWORK_ADDRESSES = { DEFAULT_PROPOSER_ADDRESS: "0x97a32D4506F6A35De68e0680859cDF41D077a9a9", GOVERNOR_PROXY: govBscmainnetContracts.addresses.GovernorBravoDelegator, NORMAL_TIMELOCK: govBscmainnetContracts.addresses.NormalTimelock, - GUARDIAN: "0x1C2CAc6ec528c20800B2fe734820D87b581eAA6B ", + FAST_TRACK_TIMELOCK: govBscmainnetContracts.addresses.FastTrackTimelock, + CRITICAL_TIMELOCK: govBscmainnetContracts.addresses.CriticalTimelock, + GUARDIAN: "0x1C2CAc6ec528c20800B2fe734820D87b581eAA6B", ETH_CHAINLINK_FEED: "0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e", USDT_CHAINLINK_FEED: "0xB97Ad0E74fa7d920791E90258A6E2085088b4320", CHAINLINK_ORACLE: oracleBscmainnetContracts.addresses.ChainlinkOracle, @@ -49,6 +51,8 @@ export const NETWORK_ADDRESSES = { GUARDIAN: "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706", GOVERNOR_PROXY: govBsctestnetContracts.addresses.GovernorBravoDelegator, NORMAL_TIMELOCK: govBsctestnetContracts.addresses.NormalTimelock, + FAST_TRACK_TIMELOCK: govBsctestnetContracts.addresses.FastTrackTimelock, + CRITICAL_TIMELOCK: govBsctestnetContracts.addresses.CriticalTimelock, ETH_CHAINLINK_FEED: "0x143db3CEEfbdfe5631aDD3E50f7614B6ba708BA7", USDT_CHAINLINK_FEED: "0xEca2605f0BCF2BA5966372C99837b1F182d3D620", CHAINLINK_ORACLE: oracleBsctestnetContracts.addresses.ChainlinkOracle, diff --git a/src/vip-framework/index.ts b/src/vip-framework/index.ts index 4300990aa..54ca389f2 100644 --- a/src/vip-framework/index.ts +++ b/src/vip-framework/index.ts @@ -29,8 +29,14 @@ const OMNICHAIN_GOVERNANCE_EXECUTOR = const VOTING_PERIOD = 28800; -export const { DEFAULT_PROPOSER_ADDRESS, GOVERNOR_PROXY, NORMAL_TIMELOCK, GUARDIAN } = - NETWORK_ADDRESSES[(FORKED_NETWORK as "bscmainnet") || "bsctestnet"] || {}; +export const { + DEFAULT_PROPOSER_ADDRESS, + GOVERNOR_PROXY, + NORMAL_TIMELOCK, + FAST_TRACK_TIMELOCK, + CRITICAL_TIMELOCK, + GUARDIAN, +} = NETWORK_ADDRESSES[(FORKED_NETWORK as "bscmainnet") || "bsctestnet"] || {}; export const { DELAY_BLOCKS } = NETWORK_CONFIG[FORKED_NETWORK as SUPPORTED_NETWORKS]; export const forking = (blockNumber: number, fn: () => Promise) => { @@ -105,9 +111,14 @@ export const testVip = (description: string, proposal: Proposal, options: Testin const governanceFixture = async (): Promise => { const proposerAddress = options.proposer ?? DEFAULT_PROPOSER_ADDRESS; const supporterAddress = options.supporter ?? DEFAULT_SUPPORTER_ADDRESS; + const timelockAddress = { + [ProposalType.REGULAR]: NORMAL_TIMELOCK, + [ProposalType.FAST_TRACK]: FAST_TRACK_TIMELOCK, + [ProposalType.CRITICAL]: CRITICAL_TIMELOCK, + }[proposal.type || ProposalType.REGULAR]; proposer = await initMainnetUser(proposerAddress, ethers.utils.parseEther("1.0")); supporter = await initMainnetUser(supporterAddress, ethers.utils.parseEther("1.0")); - impersonatedTimelock = await initMainnetUser(NORMAL_TIMELOCK, ethers.utils.parseEther("40")); + impersonatedTimelock = await initMainnetUser(timelockAddress, ethers.utils.parseEther("40")); // Iniitalize impl via Proxy governorProxy = await ethers.getContractAt(