Skip to content

Commit d0f814f

Browse files
committed
fix: bot
1 parent c77c1a5 commit d0f814f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

contracts/scripts/keeperBot.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {
2-
DisputeKitClassic,
3-
KlerosCore,
42
PNK,
53
RandomizerRNG,
64
BlockHashRNG,
75
SortitionModule,
6+
KlerosCore,
87
KlerosCoreNeo,
9-
KlerosCoreUniversity,
8+
SortitionModuleNeo,
9+
DisputeKitClassic,
1010
} from "../typechain-types";
1111
import request from "graphql-request";
1212
import env from "./utils/env";
@@ -43,25 +43,26 @@ const loggerOptions = env.optionalNoDefault("LOGTAIL_TOKEN_KEEPER_BOT")
4343
const logger = loggerFactory.createLogger(loggerOptions);
4444

4545
const getContracts = async () => {
46-
let core: KlerosCore | KlerosCoreNeo | KlerosCoreUniversity;
46+
let core: KlerosCore | KlerosCoreNeo;
47+
let sortition: SortitionModule | SortitionModuleNeo;
48+
let disputeKitClassic: DisputeKitClassic;
4749
const coreType = Cores[CORE_TYPE.toUpperCase() as keyof typeof Cores];
4850
switch (coreType) {
49-
case Cores.UNIVERSITY:
50-
core = (await ethers.getContract("KlerosCoreUniversity")) as KlerosCoreUniversity;
51-
break;
5251
case Cores.NEO:
5352
core = (await ethers.getContract("KlerosCoreNeo")) as KlerosCoreNeo;
53+
sortition = (await ethers.getContract("SortitionModuleNeo")) as SortitionModuleNeo;
54+
disputeKitClassic = (await ethers.getContract("DisputeKitClassicNeo")) as DisputeKitClassic;
5455
break;
5556
case Cores.BASE:
5657
core = (await ethers.getContract("KlerosCore")) as KlerosCore;
58+
sortition = (await ethers.getContract("SortitionModule")) as SortitionModule;
59+
disputeKitClassic = (await ethers.getContract("DisputeKitClassic")) as DisputeKitClassic;
5760
break;
5861
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");
6063
}
61-
const sortition = (await ethers.getContract("SortitionModule")) as SortitionModule;
6264
const randomizerRng = (await ethers.getContract("RandomizerRNG")) as RandomizerRNG;
6365
const blockHashRNG = (await ethers.getContract("BlockHashRNG")) as BlockHashRNG;
64-
const disputeKitClassic = (await ethers.getContract("DisputeKitClassic")) as DisputeKitClassic;
6566
const pnk = (await ethers.getContract("PNK")) as PNK;
6667
return { core, sortition, randomizerRng, blockHashRNG, disputeKitClassic, pnk };
6768
};
@@ -94,7 +95,6 @@ type CustomError = {
9495
enum Cores {
9596
BASE,
9697
NEO,
97-
UNIVERSITY,
9898
}
9999

100100
enum Phase {
@@ -454,7 +454,7 @@ const filterAsync = async <T>(
454454
return array.filter((value, index) => filterMap[index]);
455455
};
456456

457-
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
457+
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
458458

459459
const sendHeartbeat = async () => {
460460
if (HEARTBEAT_URL) {

0 commit comments

Comments
 (0)