Skip to content

Commit

Permalink
fix: check pool registry ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
web3rover committed Dec 19, 2024
1 parent 56bafc5 commit 20c23b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions simulations/vip-502/basemainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import CHAINLINK_ORACLE_ABI from "../vip-502/abi/chainlinkOracle.json";
import RESILLIENT_ORACLE_ABI from "../vip-502/abi/resilientOracle.json";
import TREASURY_ABI from "../vip-502/abi/treasury.json";
import XVS_BRIDGE_ADMIN_ABI from "../vip-502/abi/xvsBridgeAdmin.json";
import POOL_REGISTRY_ABI from "./abi/PoolRegistry.json";

const { basemainnet } = NETWORK_ADDRESSES;

Expand All @@ -45,6 +46,7 @@ forking(23908020, async () => {
let boundValidator: Contract;
let xvsBridgeAdmin: Contract;
let treasury: Contract;
let poolRegistry: Contract;

before(async () => {
await impersonateAccount(basemainnet.NORMAL_TIMELOCK);
Expand All @@ -63,6 +65,7 @@ forking(23908020, async () => {
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());
Expand Down Expand Up @@ -123,6 +126,9 @@ forking(23908020, async () => {
it("Normal Timelock should be the owner of the Vtreasury", async () => {
expect(await treasury.owner()).equals(basemainnet.NORMAL_TIMELOCK);
});
it("Normal Timelock should be the owner of the PoolRegistry", async () => {
expect(await poolRegistry.owner()).equals(basemainnet.NORMAL_TIMELOCK);
});
it("can transfer tokens from the treasury", async () => {
const prevBalance = await provider.getBalance(basemainnet.NORMAL_TIMELOCK);
await treasury.withdrawTreasuryNative(ethers.utils.parseEther("100"), basemainnet.NORMAL_TIMELOCK);
Expand Down

0 comments on commit 20c23b8

Please sign in to comment.