File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export function handleDisputeCreation(event: DisputeCreation): void {
75
75
court . save ( ) ;
76
76
createDisputeFromEvent ( event ) ;
77
77
const roundInfo = contract . getRoundInfo ( disputeID , ZERO ) ;
78
- createRoundFromRoundInfo ( disputeID , ZERO , court . feeForJuror , roundInfo ) ;
78
+ createRoundFromRoundInfo ( disputeID , ZERO , roundInfo ) ;
79
79
const arbitrable = event . params . _arbitrable . toHexString ( ) ;
80
80
updateArbitrableCases ( arbitrable , ONE ) ;
81
81
updateCases ( ONE , event . block . timestamp ) ;
@@ -117,7 +117,7 @@ export function handleAppealDecision(event: AppealDecision): void {
117
117
dispute . save ( ) ;
118
118
const feeForJuror = getFeeForJuror ( dispute . court ) ;
119
119
const roundInfo = contract . getRoundInfo ( disputeID , newRoundIndex ) ;
120
- createRoundFromRoundInfo ( disputeID , newRoundIndex , feeForJuror , roundInfo ) ;
120
+ createRoundFromRoundInfo ( disputeID , newRoundIndex , roundInfo ) ;
121
121
}
122
122
123
123
export function handleDraw ( event : DrawEvent ) : void {
Original file line number Diff line number Diff line change @@ -5,17 +5,16 @@ import { Round } from "../../generated/schema";
5
5
export function createRoundFromRoundInfo (
6
6
disputeID : BigInt ,
7
7
roundIndex : BigInt ,
8
- feeForJuror : BigInt ,
9
8
roundInfo : KlerosCore__getRoundInfoResult
10
9
) : void {
11
10
const roundID = `${ disputeID . toString ( ) } -${ roundIndex . toString ( ) } ` ;
12
11
const round = new Round ( roundID ) ;
13
- round . disputeKit = roundInfo . value5 . toString ( ) ;
14
- round . tokensAtStakePerJuror = roundInfo . value0 ;
15
- round . totalFeesForJurors = roundInfo . value1 ;
16
- round . nbVotes = roundInfo . value1 . div ( feeForJuror ) ;
17
- round . repartitions = roundInfo . value2 ;
18
- round . penalties = roundInfo . value3 ;
12
+ round . disputeKit = roundInfo . getDisputeKitID . toString ( ) ;
13
+ round . tokensAtStakePerJuror = roundInfo . getPnkAtStakePerJuror ( ) ;
14
+ round . totalFeesForJurors = roundInfo . getTotalFeesForJurors ( ) ;
15
+ round . nbVotes = roundInfo . getNbVotes ( ) ;
16
+ round . repartitions = roundInfo . getRepartitions ( ) ;
17
+ round . penalties = roundInfo . getPnkPenalties ( ) ;
19
18
round . dispute = disputeID . toString ( ) ;
20
19
round . save ( ) ;
21
20
}
You can’t perform that action at this time.
0 commit comments