Skip to content

Commit b359808

Browse files
f: remove _verifyAllocationProof duplicated
1 parent bd3495e commit b359808

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

packages/subgraph-service/contracts/libraries/AllocationManagerLib.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ library AllocationManagerLib {
278278
* @notice Verifies ownership of an allocation id by verifying an EIP712 allocation proof
279279
* @dev Requirements:
280280
* - Signer must be the allocation id address
281+
* @param _encodeAllocationProof The EIP712 encoded allocation proof
281282
* @param _allocationId The id of the allocation
282283
* @param _proof The EIP712 proof, an EIP712 signed message of (indexer,allocationId)
283284
*/

packages/subgraph-service/contracts/utilities/AllocationManager.sol

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { GraphDirectory } from "@graphprotocol/horizon/contracts/utilities/Graph
77
import { AllocationManagerV1Storage } from "./AllocationManagerStorage.sol";
88

99
import { TokenUtils } from "@graphprotocol/contracts/contracts/utils/TokenUtils.sol";
10-
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
1110
import { EIP712Upgradeable } from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";
1211
import { Allocation } from "../libraries/Allocation.sol";
1312
import { LegacyAllocation } from "../libraries/LegacyAllocation.sol";
@@ -391,17 +390,4 @@ abstract contract AllocationManager is EIP712Upgradeable, GraphDirectory, Alloca
391390
_delegationRatio
392391
);
393392
}
394-
395-
/**
396-
* @notice Verifies ownership of an allocation id by verifying an EIP712 allocation proof
397-
* @dev Requirements:
398-
* - Signer must be the allocation id address
399-
* @param _indexer The address of the indexer
400-
* @param _allocationId The id of the allocation
401-
* @param _proof The EIP712 proof, an EIP712 signed message of (indexer,allocationId)
402-
*/
403-
function _verifyAllocationProof(address _indexer, address _allocationId, bytes memory _proof) private view {
404-
address signer = ECDSA.recover(_encodeAllocationProof(_indexer, _allocationId), _proof);
405-
require(signer == _allocationId, AllocationManagerInvalidAllocationProof(signer, _allocationId));
406-
}
407393
}

0 commit comments

Comments
 (0)