Skip to content

Commit 333169d

Browse files
fix(KC): test file fix
1 parent 75c9510 commit 333169d

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

contracts/test/integration/index.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -87,33 +87,33 @@ describe("Demo pre-alpha1", function () {
8787

8888
await pnk.approve(core.address, ONE_THOUSAND_PNK.mul(100));
8989

90-
await core.setStake(0, ONE_THOUSAND_PNK);
91-
await core.getJurorBalance(deployer, 0).then((result) => {
90+
await core.setStake(1, ONE_THOUSAND_PNK);
91+
await core.getJurorBalance(deployer, 1).then((result) => {
9292
expect(result.staked).to.equal(ONE_THOUSAND_PNK);
9393
expect(result.locked).to.equal(0);
9494
logJurorBalance(result);
9595
});
9696

97-
await core.setStake(0, ONE_HUNDRED_PNK.mul(5));
98-
await core.getJurorBalance(deployer, 0).then((result) => {
97+
await core.setStake(1, ONE_HUNDRED_PNK.mul(5));
98+
await core.getJurorBalance(deployer, 1).then((result) => {
9999
expect(result.staked).to.equal(ONE_HUNDRED_PNK.mul(5));
100100
expect(result.locked).to.equal(0);
101101
logJurorBalance(result);
102102
});
103103

104-
await core.setStake(0, 0);
105-
await core.getJurorBalance(deployer, 0).then((result) => {
104+
await core.setStake(1, 0);
105+
await core.getJurorBalance(deployer, 1).then((result) => {
106106
expect(result.staked).to.equal(0);
107107
expect(result.locked).to.equal(0);
108108
logJurorBalance(result);
109109
});
110110

111-
await core.setStake(0, ONE_THOUSAND_PNK.mul(4));
112-
await core.getJurorBalance(deployer, 0).then((result) => {
111+
await core.setStake(1, ONE_THOUSAND_PNK.mul(4));
112+
await core.getJurorBalance(deployer, 1).then((result) => {
113113
expect(result.staked).to.equal(ONE_THOUSAND_PNK.mul(4));
114114
expect(result.locked).to.equal(0);
115115
logJurorBalance(result);
116-
});
116+
});
117117
const tx = await arbitrable.createDispute(2, "0x00", 0, { value: arbitrationCost });
118118
const trace = await network.provider.send("debug_traceTransaction", [tx.hash]);
119119
const [disputeId] = ethers.utils.defaultAbiCoder.decode(["uint"], `0x${trace.returnValue}`);
@@ -141,7 +141,7 @@ describe("Demo pre-alpha1", function () {
141141

142142
await network.provider.send("evm_increaseTime", [130]); // Wait for minStakingTime
143143
await network.provider.send("evm_mine");
144-
144+
145145
expect(await core.phase()).to.equal(Phase.staking);
146146
expect(await disputeKit.phase()).to.equal(DisputeKitPhase.resolving);
147147
expect(await disputeKit.disputesWithoutJurors()).to.equal(1);
@@ -176,14 +176,14 @@ describe("Demo pre-alpha1", function () {
176176

177177
await core.passPeriod(0);
178178
expect((await core.disputes(0)).period).to.equal(Period.vote);
179-
await disputeKit.connect(await ethers.getSigner(deployer)).castVote(0, [0, 1, 2], 0, 0);
179+
await disputeKit.connect(await ethers.getSigner(deployer)).castVote(0, [0, 1, 2], 0, 0, "");
180180
await core.passPeriod(0);
181181
await core.passPeriod(0);
182182
expect((await core.disputes(0)).period).to.equal(Period.execution);
183183
await core.execute(0, 0, 1000);
184184
const ticket1 = await fastBridgeSender.currentTicketID();
185185
expect(ticket1).to.equal(1);
186-
186+
187187
const tx4 = await core.executeRuling(0);
188188
expect(tx4).to.emit(fastBridgeSender, "OutgoingMessage");
189189

@@ -225,29 +225,29 @@ describe("Demo pre-alpha1", function () {
225225

226226
console.log("KC phase: %d, DK phase: ", await core.phase(), await disputeKit.phase());
227227

228-
await core.setStake(0, ONE_THOUSAND_PNK);
229-
await core.getJurorBalance(deployer, 0).then((result) => {
228+
await core.setStake(1, ONE_THOUSAND_PNK);
229+
await core.getJurorBalance(deployer, 1).then((result) => {
230230
expect(result.staked).to.equal(ONE_THOUSAND_PNK);
231231
expect(result.locked).to.equal(0);
232232
logJurorBalance(result);
233233
});
234234

235-
await core.setStake(0, ONE_HUNDRED_PNK.mul(5));
236-
await core.getJurorBalance(deployer, 0).then((result) => {
235+
await core.setStake(1, ONE_HUNDRED_PNK.mul(5));
236+
await core.getJurorBalance(deployer, 1).then((result) => {
237237
expect(result.staked).to.equal(ONE_HUNDRED_PNK.mul(5));
238238
expect(result.locked).to.equal(0);
239239
logJurorBalance(result);
240240
});
241241

242-
await core.setStake(0, 0);
243-
await core.getJurorBalance(deployer, 0).then((result) => {
242+
await core.setStake(1, 0);
243+
await core.getJurorBalance(deployer, 1).then((result) => {
244244
expect(result.staked).to.equal(0);
245245
expect(result.locked).to.equal(0);
246246
logJurorBalance(result);
247247
});
248248

249-
await core.setStake(0, ONE_THOUSAND_PNK.mul(4));
250-
await core.getJurorBalance(deployer, 0).then((result) => {
249+
await core.setStake(1, ONE_THOUSAND_PNK.mul(4));
250+
await core.getJurorBalance(deployer, 1).then((result) => {
251251
expect(result.staked).to.equal(ONE_THOUSAND_PNK.mul(4));
252252
expect(result.locked).to.equal(0);
253253
logJurorBalance(result);
@@ -342,7 +342,7 @@ describe("Demo pre-alpha1", function () {
342342

343343
console.log("KC phase: %d, DK phase: ", await core.phase(), await disputeKit.phase());
344344

345-
await disputeKit.connect(await ethers.getSigner(deployer)).castVote(0, [0, 1, 2], 0, 0);
345+
await disputeKit.connect(await ethers.getSigner(deployer)).castVote(0, [0, 1, 2], 0, 0, "");
346346
await core.passPeriod(0);
347347
await core.passPeriod(0);
348348
expect((await core.disputes(0)).period).to.equal(Period.execution);
@@ -419,29 +419,29 @@ describe("Demo pre-alpha1", function () {
419419

420420
await pnk.approve(core.address, ONE_THOUSAND_PNK.mul(100));
421421

422-
await core.setStake(0, ONE_THOUSAND_PNK);
423-
await core.getJurorBalance(deployer, 0).then((result) => {
422+
await core.setStake(1, ONE_THOUSAND_PNK);
423+
await core.getJurorBalance(deployer, 1).then((result) => {
424424
expect(result.staked).to.equal(ONE_THOUSAND_PNK);
425425
expect(result.locked).to.equal(0);
426426
logJurorBalance(result);
427427
});
428428

429-
await core.setStake(0, ONE_HUNDRED_PNK.mul(5));
430-
await core.getJurorBalance(deployer, 0).then((result) => {
429+
await core.setStake(1, ONE_HUNDRED_PNK.mul(5));
430+
await core.getJurorBalance(deployer, 1).then((result) => {
431431
expect(result.staked).to.equal(ONE_HUNDRED_PNK.mul(5));
432432
expect(result.locked).to.equal(0);
433433
logJurorBalance(result);
434434
});
435435

436-
await core.setStake(0, 0);
437-
await core.getJurorBalance(deployer, 0).then((result) => {
436+
await core.setStake(1, 0);
437+
await core.getJurorBalance(deployer, 1).then((result) => {
438438
expect(result.staked).to.equal(0);
439439
expect(result.locked).to.equal(0);
440440
logJurorBalance(result);
441441
});
442442

443-
await core.setStake(0, ONE_THOUSAND_PNK.mul(4));
444-
await core.getJurorBalance(deployer, 0).then((result) => {
443+
await core.setStake(1, ONE_THOUSAND_PNK.mul(4));
444+
await core.getJurorBalance(deployer, 1).then((result) => {
445445
expect(result.staked).to.equal(ONE_THOUSAND_PNK.mul(4));
446446
expect(result.locked).to.equal(0);
447447
logJurorBalance(result);
@@ -507,7 +507,7 @@ describe("Demo pre-alpha1", function () {
507507
await core.passPeriod(coreId);
508508
expect((await core.disputes(coreId)).period).to.equal(Period.vote);
509509

510-
await disputeKit.connect(await ethers.getSigner(deployer)).castVote(coreId, [0, 1, 2], 0, 0);
510+
await disputeKit.connect(await ethers.getSigner(deployer)).castVote(coreId, [0, 1, 2], 0, 0, "");
511511
await core.passPeriod(coreId);
512512
await core.passPeriod(coreId);
513513
expect((await core.disputes(coreId)).period).to.equal(Period.execution);

0 commit comments

Comments
 (0)