@@ -15,13 +15,16 @@ import { ZERO, ONE } from "./utils";
1515import {
1616 createCourtFromEvent ,
1717 getFeeForJuror ,
18- loadCourtWithLog ,
18+ loadCourtWithLogs ,
1919} from "./entities/Court" ;
2020import {
2121 createDisputeKitFromEvent ,
2222 filterSupportedDisputeKits ,
2323} from "./entities/DisputeKit" ;
24- import { createDisputeFromEvent , loadDisputeWithLog } from "./entities/Dispute" ;
24+ import {
25+ createDisputeFromEvent ,
26+ loadDisputeWithLogs ,
27+ } from "./entities/Dispute" ;
2528import { createRoundFromRoundInfo } from "./entities/Round" ;
2629import {
2730 updateCases ,
@@ -50,7 +53,7 @@ export function handleCourtCreated(event: CourtCreated): void {
5053export function handleCourtModified ( event : CourtModified ) : void {
5154 const contract = KlerosCore . bind ( event . address ) ;
5255 const courtContractState = contract . courts ( event . params . _courtID ) ;
53- const court = loadCourtWithLog ( event . params . _courtID . toString ( ) ) ;
56+ const court = loadCourtWithLogs ( event . params . _courtID . toString ( ) ) ;
5457 if ( ! court ) return ;
5558 court . hiddenVotes = courtContractState . value1 ;
5659 court . minStake = courtContractState . value2 ;
@@ -66,7 +69,7 @@ export function handleDisputeKitCreated(event: DisputeKitCreated): void {
6669}
6770
6871export function handleDisputeKitEnabled ( event : DisputeKitEnabled ) : void {
69- const court = loadCourtWithLog ( event . params . _courtID . toString ( ) ) ;
72+ const court = loadCourtWithLogs ( event . params . _courtID . toString ( ) ) ;
7073 if ( ! court ) return ;
7174 const isEnable = event . params . _enable ;
7275 const disputeKitID = event . params . _disputeKitID . toString ( ) ;
@@ -81,7 +84,7 @@ export function handleDisputeCreation(event: DisputeCreation): void {
8184 const disputeID = event . params . _disputeID ;
8285 const disputeStorage = contract . disputes ( disputeID ) ;
8386 const courtID = disputeStorage . value0 . toString ( ) ;
84- const court = loadCourtWithLog ( courtID ) ;
87+ const court = loadCourtWithLogs ( courtID ) ;
8588 if ( ! court ) return ;
8689 court . numberDisputes = court . numberDisputes . plus ( ONE ) ;
8790 court . save ( ) ;
@@ -93,7 +96,7 @@ export function handleDisputeCreation(event: DisputeCreation): void {
9396
9497export function handleNewPeriod ( event : NewPeriod ) : void {
9598 const disputeID = event . params . _disputeID . toString ( ) ;
96- const dispute = loadDisputeWithLog ( disputeID ) ;
99+ const dispute = loadDisputeWithLogs ( disputeID ) ;
97100 if ( ! dispute ) return ;
98101 dispute . period = getPeriodName ( event . params . _period ) ;
99102 dispute . lastPeriodChange = event . block . timestamp ;
@@ -103,7 +106,7 @@ export function handleNewPeriod(event: NewPeriod): void {
103106export function handleAppealDecision ( event : AppealDecision ) : void {
104107 const contract = KlerosCore . bind ( event . address ) ;
105108 const disputeID = event . params . _disputeID ;
106- const dispute = loadDisputeWithLog ( disputeID . toString ( ) ) ;
109+ const dispute = loadDisputeWithLogs ( disputeID . toString ( ) ) ;
107110 if ( ! dispute ) return ;
108111 const newRoundIndex = dispute . currentRoundIndex . plus ( ONE ) ;
109112 const roundID = `${ disputeID } -${ newRoundIndex . toString ( ) } ` ;
@@ -118,7 +121,7 @@ export function handleAppealDecision(event: AppealDecision): void {
118121export function handleDraw ( event : DrawEvent ) : void {
119122 createDrawFromEvent ( event ) ;
120123 const disputeID = event . params . _disputeID . toString ( ) ;
121- const dispute = loadDisputeWithLog ( disputeID ) ;
124+ const dispute = loadDisputeWithLogs ( disputeID ) ;
122125 if ( ! dispute ) return ;
123126 const contract = KlerosCore . bind ( event . address ) ;
124127 updateJurorStake (
@@ -158,9 +161,9 @@ export function handleTokenAndETHShift(event: TokenAndETHShiftEvent): void {
158161 updateRedistributedPNK ( tokenAmount , event . block . timestamp ) ;
159162 }
160163 updatePaidETH ( ethAmount , event . block . timestamp ) ;
161- const dispute = loadDisputeWithLog ( disputeID ) ;
164+ const dispute = loadDisputeWithLogs ( disputeID ) ;
162165 if ( ! dispute ) return ;
163- const court = loadCourtWithLog ( dispute . court ) ;
166+ const court = loadCourtWithLogs ( dispute . court ) ;
164167 if ( ! court ) return ;
165168 updateJurorStake (
166169 jurorAddress ,
0 commit comments