File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 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 {
7575 court . save ( ) ;
7676 createDisputeFromEvent ( event ) ;
7777 const roundInfo = contract . getRoundInfo ( disputeID , ZERO ) ;
78- createRoundFromRoundInfo ( disputeID , ZERO , court . feeForJuror , roundInfo ) ;
78+ createRoundFromRoundInfo ( disputeID , ZERO , roundInfo ) ;
7979 const arbitrable = event . params . _arbitrable . toHexString ( ) ;
8080 updateArbitrableCases ( arbitrable , ONE ) ;
8181 updateCases ( ONE , event . block . timestamp ) ;
@@ -117,7 +117,7 @@ export function handleAppealDecision(event: AppealDecision): void {
117117 dispute . save ( ) ;
118118 const feeForJuror = getFeeForJuror ( dispute . court ) ;
119119 const roundInfo = contract . getRoundInfo ( disputeID , newRoundIndex ) ;
120- createRoundFromRoundInfo ( disputeID , newRoundIndex , feeForJuror , roundInfo ) ;
120+ createRoundFromRoundInfo ( disputeID , newRoundIndex , roundInfo ) ;
121121}
122122
123123export function handleDraw ( event : DrawEvent ) : void {
Original file line number Diff line number Diff line change @@ -5,17 +5,16 @@ import { Round } from "../../generated/schema";
55export function createRoundFromRoundInfo (
66 disputeID : BigInt ,
77 roundIndex : BigInt ,
8- feeForJuror : BigInt ,
98 roundInfo : KlerosCore__getRoundInfoResult
109) : void {
1110 const roundID = `${ disputeID . toString ( ) } -${ roundIndex . toString ( ) } ` ;
1211 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 ( ) ;
1918 round . dispute = disputeID . toString ( ) ;
2019 round . save ( ) ;
2120}
You can’t perform that action at this time.
0 commit comments