Skip to content

Commit ef35364

Browse files
committed
fix: remove setDeniedMany since it's unused (OZ N-03)
1 parent 1ce46f0 commit ef35364

File tree

3 files changed

+0
-35
lines changed

3 files changed

+0
-35
lines changed

packages/contracts/contracts/rewards/IRewardsManager.sol

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ interface IRewardsManager {
2525

2626
function setDenied(bytes32 _subgraphDeploymentID, bool _deny) external;
2727

28-
function setDeniedMany(bytes32[] calldata _subgraphDeploymentID, bool[] calldata _deny)
29-
external;
30-
3128
function isDenied(bytes32 _subgraphDeploymentID) external view returns (bool);
3229

3330
// -- Getters --

packages/contracts/contracts/rewards/RewardsManager.sol

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -144,23 +144,6 @@ contract RewardsManager is RewardsManagerV4Storage, GraphUpgradeable, IRewardsMa
144144
_setDenied(_subgraphDeploymentID, _deny);
145145
}
146146

147-
/**
148-
* @dev Denies to claim rewards for multiple subgraph.
149-
* NOTE: Can only be called by the subgraph availability oracle
150-
* @param _subgraphDeploymentID Array of subgraph deployment ID
151-
* @param _deny Array of denied status for claiming rewards for each subgraph
152-
*/
153-
function setDeniedMany(bytes32[] calldata _subgraphDeploymentID, bool[] calldata _deny)
154-
external
155-
override
156-
onlySubgraphAvailabilityOracle
157-
{
158-
require(_subgraphDeploymentID.length == _deny.length, "!length");
159-
for (uint256 i = 0; i < _subgraphDeploymentID.length; i++) {
160-
_setDenied(_subgraphDeploymentID[i], _deny[i]);
161-
}
162-
}
163-
164147
/**
165148
* @dev Internal: Denies to claim rewards for a subgraph.
166149
* @param _subgraphDeploymentID Subgraph deployment ID

packages/contracts/test/rewards/rewards.test.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -213,21 +213,6 @@ describe('Rewards', () => {
213213
.withArgs(subgraphDeploymentID1, blockNum + 1)
214214
expect(await rewardsManager.isDenied(subgraphDeploymentID1)).eq(true)
215215
})
216-
217-
it('reject deny subgraph w/ many if not the oracle', async function () {
218-
const deniedSubgraphs = [subgraphDeploymentID1, subgraphDeploymentID2]
219-
const tx = rewardsManager.connect(oracle).setDeniedMany(deniedSubgraphs, [true, true])
220-
await expect(tx).revertedWith('Caller must be the subgraph availability oracle')
221-
})
222-
223-
it('should deny subgraph w/ many', async function () {
224-
await rewardsManager.connect(governor).setSubgraphAvailabilityOracle(oracle.address)
225-
226-
const deniedSubgraphs = [subgraphDeploymentID1, subgraphDeploymentID2]
227-
await rewardsManager.connect(oracle).setDeniedMany(deniedSubgraphs, [true, true])
228-
expect(await rewardsManager.isDenied(subgraphDeploymentID1)).eq(true)
229-
expect(await rewardsManager.isDenied(subgraphDeploymentID2)).eq(true)
230-
})
231216
})
232217
})
233218

0 commit comments

Comments
 (0)