Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update function visibility (OZ N-16) #1051

Merged
merged 5 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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);
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 @@ -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);
Expand All @@ -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];
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
Loading