@@ -59,6 +59,7 @@ contract GeneralizedTCR is IArbitrable, IEvidence {
59
59
Arbitrator arbitrator; // The arbitrator trusted to solve disputes for this request.
60
60
bytes arbitratorExtraData; // The extra data for the trusted arbitrator of this request.
61
61
Status requestType; // The intent of the request. Used to keep a history of the request.
62
+ uint metaEvidenceID; // The meta evidence to be used in a dispute for this case.
62
63
}
63
64
64
65
struct Round {
@@ -236,9 +237,7 @@ contract GeneralizedTCR is IArbitrable, IEvidence {
236
237
emit Dispute (
237
238
request.arbitrator,
238
239
request.disputeID,
239
- item.status == Status.RegistrationRequested
240
- ? 2 * metaEvidenceUpdates
241
- : 2 * metaEvidenceUpdates + 1 ,
240
+ request.metaEvidenceID,
242
241
uint (keccak256 (abi.encodePacked (_itemID, item.requests.length - 1 )))
243
242
);
244
243
@@ -533,19 +532,23 @@ contract GeneralizedTCR is IArbitrable, IEvidence {
533
532
534
533
emit ItemSubmitted (itemID, msg .sender , item.data);
535
534
}
536
- if (item.status == Status.Absent)
535
+
536
+ Request storage request = item.requests[item.requests.length ++ ];
537
+ if (item.status == Status.Absent) {
537
538
item.status = Status.RegistrationRequested;
538
- else if (item.status == Status.Registered)
539
+ request.metaEvidenceID = 2 * metaEvidenceUpdates;
540
+ } else if (item.status == Status.Registered) {
539
541
item.status = Status.ClearingRequested;
540
- else
542
+ request.metaEvidenceID = 2 * metaEvidenceUpdates + 1 ;
543
+ } else
541
544
revert ("Item already has a pending request. " );
542
545
543
- Request storage request = item.requests[item.requests.length ++ ];
544
546
request.parties[uint (Party.Requester)] = msg .sender ;
545
547
request.submissionTime = now ;
546
548
request.arbitrator = arbitrator;
547
549
request.arbitratorExtraData = arbitratorExtraData;
548
550
request.requestType = item.status;
551
+
549
552
Round storage round = request.rounds[request.rounds.length ++ ];
550
553
551
554
uint arbitrationCost = request.arbitrator.arbitrationCost (request.arbitratorExtraData);
0 commit comments