Skip to content

Commit

Permalink
test: vault setup
Browse files Browse the repository at this point in the history
  • Loading branch information
failingtwice committed Oct 23, 2024
1 parent 151649a commit 3d930c5
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/0.8.25/vaults/vault.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";
import { expect } from "chai";
import { ethers } from "hardhat";
import { Snapshot } from "test/suite";
import {
DepositContract__MockForBeaconChainDepositor,
DepositContract__MockForBeaconChainDepositor__factory,
} from "typechain-types";
import { Vault } from "typechain-types/contracts/0.8.25/vaults";
import { Vault__factory } from "typechain-types/factories/contracts/0.8.25/vaults";

describe.only("Basic vault", async () => {
let deployer: HardhatEthersSigner;
let owner: HardhatEthersSigner;

let depositContract: DepositContract__MockForBeaconChainDepositor;
let vault: Vault;

let originalState: string;

before(async () => {
[deployer, owner] = await ethers.getSigners();

const depositContractFactory = new DepositContract__MockForBeaconChainDepositor__factory(deployer);
depositContract = await depositContractFactory.deploy();

const vaultFactory = new Vault__factory(owner);
vault = await vaultFactory.deploy(await owner.getAddress(), await depositContract.getAddress());

expect(await vault.owner()).to.equal(await owner.getAddress());
});

beforeEach(async () => (originalState = await Snapshot.take()));
afterEach(async () => await Snapshot.restore(originalState));

describe("receive", () => {
it("test", async () => {});
});
});

0 comments on commit 3d930c5

Please sign in to comment.