From b721f7254cad577bedb5f7a12495c634e7f7b1df Mon Sep 17 00:00:00 2001 From: MoonBoi9001 Date: Tue, 1 Oct 2024 13:41:51 +0100 Subject: [PATCH 1/5] fix: set _verifyAllocationProof visability private. --- .../subgraph-service/contracts/utilities/AllocationManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/subgraph-service/contracts/utilities/AllocationManager.sol b/packages/subgraph-service/contracts/utilities/AllocationManager.sol index 97c3adf99..00a323b9a 100644 --- a/packages/subgraph-service/contracts/utilities/AllocationManager.sol +++ b/packages/subgraph-service/contracts/utilities/AllocationManager.sol @@ -465,7 +465,7 @@ abstract contract AllocationManager is EIP712Upgradeable, GraphDirectory, Alloca * @param _allocationId The id of the allocation * @param _proof The EIP712 proof, an EIP712 signed message of (indexer,allocationId) */ - function _verifyAllocationProof(address _indexer, address _allocationId, bytes memory _proof) internal view { + function _verifyAllocationProof(address _indexer, address _allocationId, bytes memory _proof) private view { bytes32 digest = _encodeAllocationProof(_indexer, _allocationId); address signer = ECDSA.recover(digest, _proof); require(signer == _allocationId, AllocationManagerInvalidAllocationProof(signer, _allocationId)); From fbc6654d755e0ec96a019bf49a47f39c223125b6 Mon Sep 17 00:00:00 2001 From: MoonBoi9001 Date: Tue, 1 Oct 2024 13:42:26 +0100 Subject: [PATCH 2/5] fix: set _getDelegatedTokensAvailable visability private. --- packages/horizon/contracts/staking/HorizonStakingBase.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/horizon/contracts/staking/HorizonStakingBase.sol b/packages/horizon/contracts/staking/HorizonStakingBase.sol index b55b39fd8..d9fb613c3 100644 --- a/packages/horizon/contracts/staking/HorizonStakingBase.sol +++ b/packages/horizon/contracts/staking/HorizonStakingBase.sol @@ -290,7 +290,7 @@ abstract contract HorizonStakingBase is /** * @notice See {IHorizonStakingBase-getDelegatedTokensAvailable}. */ - function _getDelegatedTokensAvailable(address _serviceProvider, address _verifier) internal view returns (uint256) { + function _getDelegatedTokensAvailable(address _serviceProvider, address _verifier) private view returns (uint256) { DelegationPoolInternal storage poolInternal = _getDelegationPool(_serviceProvider, _verifier); return poolInternal.tokens - poolInternal.tokensThawing; } From decde7fbf38d25d42b671c8a6a07aa966c4467e9 Mon Sep 17 00:00:00 2001 From: MoonBoi9001 Date: Tue, 1 Oct 2024 13:44:05 +0100 Subject: [PATCH 3/5] fix: set _receiveIndexerStake _receiveDelegation visability private. --- .../horizon/contracts/staking/HorizonStakingExtension.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/horizon/contracts/staking/HorizonStakingExtension.sol b/packages/horizon/contracts/staking/HorizonStakingExtension.sol index 66efe5521..d81e707b9 100644 --- a/packages/horizon/contracts/staking/HorizonStakingExtension.sol +++ b/packages/horizon/contracts/staking/HorizonStakingExtension.sol @@ -326,7 +326,7 @@ contract HorizonStakingExtension is HorizonStakingBase, IL2StakingBase, IHorizon function _receiveIndexerStake( uint256 _tokens, IL2StakingTypes.ReceiveIndexerStakeData memory _indexerData - ) internal { + ) private { address indexer = _indexerData.indexer; // Deposit tokens into the indexer stake _stake(indexer, _tokens); @@ -345,7 +345,7 @@ contract HorizonStakingExtension is HorizonStakingBase, IL2StakingBase, IHorizon function _receiveDelegation( uint256 _tokens, IL2StakingTypes.ReceiveDelegationData memory _delegationData - ) internal { + ) private { require(_provisions[_delegationData.indexer][SUBGRAPH_DATA_SERVICE_ADDRESS].createdAt != 0, "!provision"); // Get the delegation pool of the indexer DelegationPoolInternal storage pool = _legacyDelegationPools[_delegationData.indexer]; From b5d3a7d379b65ceaa841fccd760d2a7763537009 Mon Sep 17 00:00:00 2001 From: MoonBoi9001 Date: Tue, 1 Oct 2024 13:44:57 +0100 Subject: [PATCH 4/5] fix: set _deposit visability private. --- packages/horizon/contracts/payments/PaymentsEscrow.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/horizon/contracts/payments/PaymentsEscrow.sol b/packages/horizon/contracts/payments/PaymentsEscrow.sol index 5d0694346..756546c47 100644 --- a/packages/horizon/contracts/payments/PaymentsEscrow.sol +++ b/packages/horizon/contracts/payments/PaymentsEscrow.sol @@ -232,7 +232,7 @@ contract PaymentsEscrow is Initializable, MulticallUpgradeable, GraphDirectory, * @param _receiver The address of the receiver * @param _tokens The amount of tokens to deposit */ - function _deposit(address _payer, address _receiver, uint256 _tokens) internal { + function _deposit(address _payer, address _receiver, uint256 _tokens) private { escrowAccounts[_payer][_receiver].balance += _tokens; _graphToken().pullTokens(msg.sender, _tokens); emit Deposit(_payer, _receiver, _tokens); From 32b39657bb2b462ac4c02068dba688318788ce65 Mon Sep 17 00:00:00 2001 From: MoonBoi9001 Date: Tue, 1 Oct 2024 13:47:26 +0100 Subject: [PATCH 5/5] fix: set drawDispute visability external. --- packages/contracts/contracts/disputes/DisputeManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contracts/contracts/disputes/DisputeManager.sol b/packages/contracts/contracts/disputes/DisputeManager.sol index 6700ec341..013a21b03 100644 --- a/packages/contracts/contracts/disputes/DisputeManager.sol +++ b/packages/contracts/contracts/disputes/DisputeManager.sol @@ -579,7 +579,7 @@ contract DisputeManager is DisputeManagerV1Storage, GraphUpgradeable, IDisputeMa * @notice Ignore a dispute with ID `_disputeID` * @param _disputeID ID of the dispute to be disregarded */ - function drawDispute(bytes32 _disputeID) public override onlyArbitrator onlyPendingDispute(_disputeID) { + function drawDispute(bytes32 _disputeID) external override onlyArbitrator onlyPendingDispute(_disputeID) { Dispute storage dispute = disputes[_disputeID]; // Return deposit to the fisherman