1- import { expect } from "chai" ;
21import { deployments , ethers , getNamedAccounts , network } from "hardhat" ;
32import { BigNumber } from "ethers" ;
4- import {
5- PNK ,
6- KlerosCore ,
7- ArbitrableExample ,
8- HomeGatewayToEthereum ,
9- DisputeKitClassic ,
10- } from "../typechain-types" ;
3+ import { PNK , KlerosCore , ArbitrableExample , HomeGatewayToEthereum , DisputeKitClassic } from "../../typechain-types" ;
114
125/* eslint-disable no-unused-vars */
136/* eslint-disable no-unused-expressions */ // https://github.com/standard/standard/issues/690#issuecomment-278533482
@@ -61,21 +54,19 @@ describe("Draw Benchmark", async () => {
6154 arbitrable = ( await ethers . getContract ( "ArbitrableExample" ) ) as ArbitrableExample ;
6255 } ) ;
6356
64-
6557 it ( "Draw Benchmark" , async ( ) => {
6658 const arbitrationCost = ONE_TENTH_ETH . mul ( 3 ) ;
6759 const [ bridger ] = await ethers . getSigners ( ) ;
6860
6961 for ( let i = 0 ; i < 16 ; i ++ ) {
7062 let wallet = ethers . Wallet . createRandom ( ) ;
71- wallet = wallet . connect ( ethers . provider ) ;
72- await bridger . sendTransaction ( { to : wallet . address , value : ethers . utils . parseEther ( "1" ) } ) ;
63+ wallet = wallet . connect ( ethers . provider ) ;
64+ await bridger . sendTransaction ( { to : wallet . address , value : ethers . utils . parseEther ( "1" ) } ) ;
7365 await pnk . transfer ( wallet . address , ONE_THOUSAND_PNK ) ;
7466 await pnk . connect ( wallet ) . approve ( core . address , ONE_THOUSAND_PNK ) ;
7567 await core . connect ( wallet ) . setStake ( 0 , ONE_THOUSAND_PNK ) ;
7668 }
7769
78-
7970 // create a dispute
8071 const tx = await arbitrable . createDispute ( 2 , "0x00" , 0 , { value : arbitrationCost } ) ;
8172 const trace = await network . provider . send ( "debug_traceTransaction" , [ tx . hash ] ) ;
@@ -92,8 +83,8 @@ describe("Draw Benchmark", async () => {
9283 await network . provider . send ( "evm_increaseTime" , [ 130 ] ) ; // Wait for minStakingTime
9384 await network . provider . send ( "evm_mine" ) ;
9485 await core . passPhase ( ) ; // Staking -> Freezing
95- for ( let index = 0 ; index < 20 ; index ++ ) { // Wait for 20 blocks finality
96- await network . provider . send ( "evm_mine" ) ;
86+ for ( let index = 0 ; index < 20 ; index ++ ) {
87+ await network . provider . send ( "evm_mine" ) ; // Wait for 20 blocks finality
9788 }
9889 await disputeKit . passPhase ( ) ; // Resolving -> Generating
9990 await disputeKit . passPhase ( ) ; // Generating -> Drawing
0 commit comments