Skip to content

Commit

Permalink
Merge pull request #1051 from graphprotocol/fix_oz_n-16
Browse files Browse the repository at this point in the history
fix: update function visibility (OZ N-16)
  • Loading branch information
MoonBoi9001 authored Oct 2, 2024
2 parents fe9d605 + 32b3965 commit 41f85c8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/contracts/contracts/disputes/DisputeManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/contracts/payments/PaymentsEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,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);
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/contracts/staking/HorizonStakingBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,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);
Expand All @@ -347,7 +347,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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 41f85c8

Please sign in to comment.