Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions packages/subgraph-service/contracts/DisputeManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ contract DisputeManager is
OwnableUpgradeable,
GraphDirectory,
AttestationManager,
DisputeManagerV1Storage,
IDisputeManager
IDisputeManager,
DisputeManagerV1Storage

{
using TokenUtils for IGraphToken;
using PPMMath for uint256;
Expand Down Expand Up @@ -370,14 +371,6 @@ contract DisputeManager is
return fishermanRewardCut;
}

/**
* @notice Get the dispute period.
* @return Dispute period in seconds
*/
function getDisputePeriod() external view override returns (uint64) {
return disputePeriod;
}

/**
* @notice Get the stake snapshot for an indexer.
* @param indexer The indexer address
Expand Down
6 changes: 3 additions & 3 deletions packages/subgraph-service/contracts/SubgraphService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,11 @@ contract SubgraphService is
/**
* @notice Getter for the accepted thawing period range for provisions
* @dev This override ensures {ProvisionManager} uses the thawing period from the {DisputeManager}
* @return min The minimum thawing period which is defined by {DisputeManager-getDisputePeriod}
* @return min The minimum thawing period which is defined by {DisputeManager-disputePeriod}
* @return max The maximum is unbounded
*/
function _getThawingPeriodRange() internal view override returns (uint64 min, uint64 max) {
uint64 disputePeriod = _disputeManager().getDisputePeriod();
uint64 disputePeriod = _disputeManager().disputePeriod();
return (disputePeriod, type(uint64).max);
}

Expand Down Expand Up @@ -549,7 +549,7 @@ contract SubgraphService is
if (tokensCollected > 0) {
// lock stake as economic security for fees
uint256 tokensToLock = tokensCollected * stakeToFeesRatio;
uint256 unlockTimestamp = block.timestamp + _disputeManager().getDisputePeriod();
uint256 unlockTimestamp = block.timestamp + _disputeManager().disputePeriod();
_lockStake(indexer, tokensToLock, unlockTimestamp);

if (tokensCurators > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ interface IDisputeManager {

function getVerifierCut() external view returns (uint32);

function getDisputePeriod() external view returns (uint64);

function isDisputeCreated(bytes32 disputeId) external view returns (bool);

function encodeReceipt(Attestation.Receipt memory receipt) external view returns (bytes32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ contract SubgraphServiceTest is SubgraphServiceSharedTest {
LinkedList.List memory claimsList = _getClaimList(_indexer);
bytes32 claimId = _buildStakeClaimId(_indexer, claimsList.nonce - 1);
IDataServiceFees.StakeClaim memory stakeClaim = _getStakeClaim(claimId);
uint64 disputePeriod = disputeManager.getDisputePeriod();
uint64 disputePeriod = disputeManager.disputePeriod();
assertEq(stakeClaim.tokens, tokensToLock);
assertEq(stakeClaim.createdAt, block.timestamp);
assertEq(stakeClaim.releaseAt, block.timestamp + disputePeriod);
Expand Down
Loading