Skip to content

Commit bb1befa

Browse files
committed
chore: rename function for clarity (OZ H-01)
Signed-off-by: Tomás Migone <[email protected]>
1 parent 02cac66 commit bb1befa

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/subgraph-service/contracts/DisputeManager.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ contract DisputeManager is
197197
}
198198

199199
/// @inheritdoc IDisputeManager
200-
function createLegacyDispute(
200+
function createAndAcceptLegacyDispute(
201201
address allocationId,
202202
address fisherman,
203203
uint256 tokensSlash,

packages/subgraph-service/contracts/interfaces/IDisputeManager.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ interface IDisputeManager {
457457
function createIndexingDispute(address allocationId, bytes32 poi) external returns (bytes32);
458458

459459
/**
460-
* @notice Create a legacy dispute.
460+
* @notice Creates and auto-accepts a legacy dispute.
461461
* This disputes can be created to settle outstanding slashing amounts with an indexer that has been
462462
* "legacy slashed" during or shortly after the transition period. See {HorizonStakingExtension.legacySlash}
463463
* for more details.
@@ -482,7 +482,7 @@ interface IDisputeManager {
482482
* @param tokensRewards The amount of tokens to reward the fisherman
483483
* @return The dispute id
484484
*/
485-
function createLegacyDispute(
485+
function createAndAcceptLegacyDispute(
486486
address allocationId,
487487
address fisherman,
488488
uint256 tokensSlash,

packages/subgraph-service/test/disputeManager/DisputeManager.t.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ contract DisputeManagerTest is SubgraphServiceSharedTest {
203203
uint256 staking;
204204
}
205205

206-
function _createLegacyDispute(
206+
function _createAndAcceptLegacyDispute(
207207
address _allocationId,
208208
address _fisherman,
209209
uint256 _tokensSlash,
@@ -236,7 +236,7 @@ contract DisputeManagerTest is SubgraphServiceSharedTest {
236236
_fisherman,
237237
_tokensRewards
238238
);
239-
bytes32 _disputeId = disputeManager.createLegacyDispute(
239+
bytes32 _disputeId = disputeManager.createAndAcceptLegacyDispute(
240240
_allocationId,
241241
_fisherman,
242242
_tokensSlash,

packages/subgraph-service/test/disputeManager/disputes/legacy.t.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ contract DisputeManagerLegacyDisputeTest is DisputeManagerTest {
3838
_provision(users.indexer, tokensProvisioned, maxSlashingPercentage, disputePeriod);
3939

4040
resetPrank(users.arbitrator);
41-
_createLegacyDispute(allocationID, users.fisherman, tokensSlash, tokensRewards);
41+
_createAndAcceptLegacyDispute(allocationID, users.fisherman, tokensSlash, tokensRewards);
4242
}
4343

4444
function test_LegacyDispute_RevertIf_NotArbitrator() public useIndexer {
4545
vm.expectRevert(abi.encodeWithSelector(IDisputeManager.DisputeManagerNotArbitrator.selector));
46-
disputeManager.createLegacyDispute(allocationID, users.fisherman, 0, 0);
46+
disputeManager.createAndAcceptLegacyDispute(allocationID, users.fisherman, 0, 0);
4747
}
4848

4949
function test_LegacyDispute_RevertIf_AllocationNotFound() public useIndexer {
5050
resetPrank(users.arbitrator);
5151
vm.expectRevert(abi.encodeWithSelector(IDisputeManager.DisputeManagerIndexerNotFound.selector, address(0)));
52-
disputeManager.createLegacyDispute(address(0), users.fisherman, 0, 0);
52+
disputeManager.createAndAcceptLegacyDispute(address(0), users.fisherman, 0, 0);
5353
}
5454
}

0 commit comments

Comments
 (0)