Skip to content

Commit

Permalink
fix: make eslint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mymphe committed Dec 2, 2024
1 parent a8f95a9 commit dd485cd
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion lib/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";

import {
BeaconProxy,
Delegation,
OssifiableProxy,
OssifiableProxy__factory,
StakingVault,
Delegation,
VaultFactory,
} from "typechain-types";

Expand Down
8 changes: 6 additions & 2 deletions test/0.8.25/vaults/delegation-voting.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";
import { expect } from "chai";
import { ethers } from "hardhat";

import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";

import { Delegation,StakingVault__MockForVaultDelegationLayer } from "typechain-types";

import { advanceChainTime, certainAddress, days, proxify } from "lib";

import { Snapshot } from "test/suite";
import { StakingVault__MockForVaultDelegationLayer, Delegation } from "typechain-types";

describe("Delegation:Voting", () => {
let deployer: HardhatEthersSigner;
Expand Down
14 changes: 7 additions & 7 deletions test/0.8.25/vaults/delegation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";

import {
Accounting,
Delegation,
DepositContract__MockForBeaconChainDepositor,
LidoLocator,
OssifiableProxy,
StakingVault,
StETH__HarnessForVaultHub,
Delegation,
VaultFactory,
} from "typechain-types";

Expand Down Expand Up @@ -76,9 +76,9 @@ describe("Delegation.sol", () => {

context("performanceDue", () => {
it("performanceDue ", async () => {
const { delegation } = await createVaultProxy(vaultFactory, vaultOwner1, lidoAgent);
const { delegation: delegation_ } = await createVaultProxy(vaultFactory, vaultOwner1, lidoAgent);

await delegation.performanceDue();
await delegation_.performanceDue();
});
});

Expand All @@ -91,18 +91,18 @@ describe("Delegation.sol", () => {
});

it("reverts if already initialized", async () => {
const { vault: vault1, delegation } = await createVaultProxy(vaultFactory, vaultOwner1, lidoAgent);
const { vault: vault1, delegation: delegation_ } = await createVaultProxy(vaultFactory, vaultOwner1, lidoAgent);

await expect(delegation.initialize(admin, vault1)).to.revertedWithCustomError(
await expect(delegation_.initialize(admin, vault1)).to.revertedWithCustomError(
delegation,
"AlreadyInitialized",
);
});

it("initialize", async () => {
const { tx, delegation } = await createVaultProxy(vaultFactory, vaultOwner1, lidoAgent);
const { tx, delegation: delegation_ } = await createVaultProxy(vaultFactory, vaultOwner1, lidoAgent);

await expect(tx).to.emit(delegation, "Initialized");
await expect(tx).to.emit(delegation_, "Initialized");
});
});
});
2 changes: 1 addition & 1 deletion test/0.8.25/vaults/vault.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { ethers } from "hardhat";
import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";

import {
Delegation,
DepositContract__MockForBeaconChainDepositor,
StakingVault,
StakingVault__factory,
StETH__HarnessForVaultHub,
Delegation,
VaultFactory,
VaultHub__MockForVault,
} from "typechain-types";
Expand Down
10 changes: 5 additions & 5 deletions test/0.8.25/vaults/vaultFactory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";

import {
Accounting,
Delegation,
DepositContract__MockForBeaconChainDepositor,
LidoLocator,
OssifiableProxy,
StakingVault,
StakingVault__HarnessForTestUpgrade,
StETH__HarnessForVaultHub,
VaultFactory,
Delegation,
} from "typechain-types";

import { certainAddress, createVaultProxy, ether } from "lib";
Expand Down Expand Up @@ -122,17 +122,17 @@ describe("VaultFactory.sol", () => {

context("createVault", () => {
it("works with empty `params`", async () => {
const { tx, vault, delegation } = await createVaultProxy(vaultFactory, vaultOwner1, lidoAgent);
const { tx, vault, delegation: delegation_ } = await createVaultProxy(vaultFactory, vaultOwner1, lidoAgent);

await expect(tx)
.to.emit(vaultFactory, "VaultCreated")
.withArgs(await delegation.getAddress(), await vault.getAddress());
.withArgs(await delegation_.getAddress(), await vault.getAddress());

await expect(tx)
.to.emit(vaultFactory, "DelegationCreated")
.withArgs(await vaultOwner1.getAddress(), await delegation.getAddress());
.withArgs(await vaultOwner1.getAddress(), await delegation_.getAddress());

expect(await delegation.getAddress()).to.eq(await vault.owner());
expect(await delegation_.getAddress()).to.eq(await vault.owner());
expect(await vault.getBeacon()).to.eq(await vaultFactory.getAddress());
});

Expand Down
2 changes: 1 addition & 1 deletion test/integration/vaults-happy-path.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ethers } from "hardhat";

import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";

import { StakingVault, Delegation } from "typechain-types";
import { Delegation,StakingVault } from "typechain-types";

import { impersonate, log, trace, updateBalance } from "lib";
import { getProtocolContext, ProtocolContext } from "lib/protocol";
Expand Down

0 comments on commit dd485cd

Please sign in to comment.