-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDhedge.test.ts
51 lines (41 loc) · 1.2 KB
/
Dhedge.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//not start yet
import { Dhedge } from "..";
import { factoryAddress } from "../config";
import { Network } from "../types";
import { wallet } from "./wallet";
const myPool = "0x279ac4c05154fd72a636fce1bc25c50966141fd0";
// const usdc = "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174";
// const weth = "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619";
// const options = {
// gasPrice: ethers.utils.parseUnits("40", "gwei")
// };
jest.setTimeout(900000);
let dhedge: Dhedge;
describe("dhedge", () => {
beforeAll(() => {
dhedge = new Dhedge(wallet, Network.POLYGON);
});
it("loads factory", () => {
const factory = dhedge.factory;
expect(factory.address).toBe(factoryAddress[dhedge.network]);
});
it("loads a pool by address", async () => {
const pool = await dhedge.loadPool(myPool);
expect(pool.poolLogic.address).toBe(myPool);
});
// it("create a pool", async () => {
// const pool = await dhedge.createPool(
// "Batman",
// "Gotham Pool",
// "DHHH",
// [
// [usdc, true],
// [weth, true]
// ],
// 25,
// options
// );
// console.log(pool.address);
// expect(pool.poolLogic.address).toBe(pool.address);
// });
});