@@ -149,7 +149,7 @@ contract DisputeManager is DisputeManagerV1Storage, GraphUpgradeable, IDisputeMa
149
149
/**
150
150
* @dev Check if the caller is the arbitrator.
151
151
*/
152
- modifier onlyArbitrator {
152
+ modifier onlyArbitrator () {
153
153
_onlyArbitrator ();
154
154
_;
155
155
}
@@ -413,10 +413,18 @@ contract DisputeManager is DisputeManagerV1Storage, GraphUpgradeable, IDisputeMa
413
413
414
414
// Create the disputes
415
415
// The deposit is zero for conflicting attestations
416
- bytes32 dID1 =
417
- _createQueryDisputeWithAttestation (fisherman, 0 , attestation1, _attestationData1);
418
- bytes32 dID2 =
419
- _createQueryDisputeWithAttestation (fisherman, 0 , attestation2, _attestationData2);
416
+ bytes32 dID1 = _createQueryDisputeWithAttestation (
417
+ fisherman,
418
+ 0 ,
419
+ attestation1,
420
+ _attestationData1
421
+ );
422
+ bytes32 dID2 = _createQueryDisputeWithAttestation (
423
+ fisherman,
424
+ 0 ,
425
+ attestation2,
426
+ _attestationData2
427
+ );
420
428
421
429
// Store the linked disputes to be resolved
422
430
disputes[dID1].relatedDisputeID = dID2;
@@ -452,16 +460,15 @@ contract DisputeManager is DisputeManagerV1Storage, GraphUpgradeable, IDisputeMa
452
460
require (staking ().getIndexerStakedTokens (indexer) > 0 , "Dispute indexer has no stake " );
453
461
454
462
// Create a disputeID
455
- bytes32 disputeID =
456
- keccak256 (
457
- abi.encodePacked (
458
- _attestation.requestCID,
459
- _attestation.responseCID,
460
- _attestation.subgraphDeploymentID,
461
- indexer,
462
- _fisherman
463
- )
464
- );
463
+ bytes32 disputeID = keccak256 (
464
+ abi.encodePacked (
465
+ _attestation.requestCID,
466
+ _attestation.responseCID,
467
+ _attestation.subgraphDeploymentID,
468
+ indexer,
469
+ _fisherman
470
+ )
471
+ );
465
472
466
473
// Only one dispute for a (indexer, subgraphDeploymentID) at a time
467
474
require (! isDisputeCreated (disputeID), "Dispute already created " );
@@ -559,8 +566,11 @@ contract DisputeManager is DisputeManagerV1Storage, GraphUpgradeable, IDisputeMa
559
566
Dispute memory dispute = _resolveDispute (_disputeID);
560
567
561
568
// Slash
562
- (, uint256 tokensToReward ) =
563
- _slashIndexer (dispute.indexer, dispute.fisherman, dispute.disputeType);
569
+ (, uint256 tokensToReward ) = _slashIndexer (
570
+ dispute.indexer,
571
+ dispute.fisherman,
572
+ dispute.disputeType
573
+ );
564
574
565
575
// Give the fisherman their deposit back
566
576
TokenUtils.pushTokens (graphToken (), dispute.fisherman, dispute.deposit);
@@ -723,12 +733,11 @@ contract DisputeManager is DisputeManagerV1Storage, GraphUpgradeable, IDisputeMa
723
733
returns (address )
724
734
{
725
735
// Obtain the hash of the fully-encoded message, per EIP-712 encoding
726
- Receipt memory receipt =
727
- Receipt (
728
- _attestation.requestCID,
729
- _attestation.responseCID,
730
- _attestation.subgraphDeploymentID
731
- );
736
+ Receipt memory receipt = Receipt (
737
+ _attestation.requestCID,
738
+ _attestation.responseCID,
739
+ _attestation.subgraphDeploymentID
740
+ );
732
741
bytes32 messageHash = encodeHashReceipt (receipt);
733
742
734
743
// Obtain the signer of the fully-encoded EIP-712 message hash
@@ -761,8 +770,10 @@ contract DisputeManager is DisputeManagerV1Storage, GraphUpgradeable, IDisputeMa
761
770
require (_data.length == ATTESTATION_SIZE_BYTES, "Attestation must be 161 bytes long " );
762
771
763
772
// Decode receipt
764
- (bytes32 requestCID , bytes32 responseCID , bytes32 subgraphDeploymentID ) =
765
- abi.decode (_data, (bytes32 , bytes32 , bytes32 ));
773
+ (bytes32 requestCID , bytes32 responseCID , bytes32 subgraphDeploymentID ) = abi.decode (
774
+ _data,
775
+ (bytes32 , bytes32 , bytes32 )
776
+ );
766
777
767
778
// Decode signature
768
779
// Signature is expected to be in the order defined in the Attestation struct
0 commit comments