|
1 | 1 | import { |
2 | | - DisputeKitClassic, |
3 | | - KlerosCore, |
4 | 2 | PNK, |
5 | 3 | RandomizerRNG, |
6 | 4 | BlockHashRNG, |
7 | 5 | SortitionModule, |
| 6 | + KlerosCore, |
8 | 7 | KlerosCoreNeo, |
9 | | - KlerosCoreUniversity, |
| 8 | + SortitionModuleNeo, |
| 9 | + DisputeKitClassic, |
10 | 10 | } from "../typechain-types"; |
11 | 11 | import request from "graphql-request"; |
12 | 12 | import env from "./utils/env"; |
@@ -43,25 +43,26 @@ const loggerOptions = env.optionalNoDefault("LOGTAIL_TOKEN_KEEPER_BOT") |
43 | 43 | const logger = loggerFactory.createLogger(loggerOptions); |
44 | 44 |
|
45 | 45 | const getContracts = async () => { |
46 | | - let core: KlerosCore | KlerosCoreNeo | KlerosCoreUniversity; |
| 46 | + let core: KlerosCore | KlerosCoreNeo; |
| 47 | + let sortition: SortitionModule | SortitionModuleNeo; |
| 48 | + let disputeKitClassic: DisputeKitClassic; |
47 | 49 | const coreType = Cores[CORE_TYPE.toUpperCase() as keyof typeof Cores]; |
48 | 50 | switch (coreType) { |
49 | | - case Cores.UNIVERSITY: |
50 | | - core = (await ethers.getContract("KlerosCoreUniversity")) as KlerosCoreUniversity; |
51 | | - break; |
52 | 51 | case Cores.NEO: |
53 | 52 | core = (await ethers.getContract("KlerosCoreNeo")) as KlerosCoreNeo; |
| 53 | + sortition = (await ethers.getContract("SortitionModuleNeo")) as SortitionModuleNeo; |
| 54 | + disputeKitClassic = (await ethers.getContract("DisputeKitClassicNeo")) as DisputeKitClassic; |
54 | 55 | break; |
55 | 56 | case Cores.BASE: |
56 | 57 | core = (await ethers.getContract("KlerosCore")) as KlerosCore; |
| 58 | + sortition = (await ethers.getContract("SortitionModule")) as SortitionModule; |
| 59 | + disputeKitClassic = (await ethers.getContract("DisputeKitClassic")) as DisputeKitClassic; |
57 | 60 | break; |
58 | 61 | default: |
59 | | - throw new Error("Invalid core type, must be one of base, neo, university"); |
| 62 | + throw new Error("Invalid core type, must be one of base, neo"); |
60 | 63 | } |
61 | | - const sortition = (await ethers.getContract("SortitionModule")) as SortitionModule; |
62 | 64 | const randomizerRng = (await ethers.getContract("RandomizerRNG")) as RandomizerRNG; |
63 | 65 | const blockHashRNG = (await ethers.getContract("BlockHashRNG")) as BlockHashRNG; |
64 | | - const disputeKitClassic = (await ethers.getContract("DisputeKitClassic")) as DisputeKitClassic; |
65 | 66 | const pnk = (await ethers.getContract("PNK")) as PNK; |
66 | 67 | return { core, sortition, randomizerRng, blockHashRNG, disputeKitClassic, pnk }; |
67 | 68 | }; |
@@ -94,7 +95,6 @@ type CustomError = { |
94 | 95 | enum Cores { |
95 | 96 | BASE, |
96 | 97 | NEO, |
97 | | - UNIVERSITY, |
98 | 98 | } |
99 | 99 |
|
100 | 100 | enum Phase { |
@@ -454,7 +454,7 @@ const filterAsync = async <T>( |
454 | 454 | return array.filter((value, index) => filterMap[index]); |
455 | 455 | }; |
456 | 456 |
|
457 | | -const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); |
| 457 | +const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); |
458 | 458 |
|
459 | 459 | const sendHeartbeat = async () => { |
460 | 460 | if (HEARTBEAT_URL) { |
|
0 commit comments