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: Function Visibility Overly Permissive #851

Open
wants to merge 1 commit into
base: consensus-fix-review
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions l2-contracts/contracts/ConsensusRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ contract ConsensusRegistry is IConsensusRegistry, Initializable, Ownable2StepUpg

/// @notice Returns an array of `AttesterAttr` structs representing the current attester committee.
/// @dev Collects active and non-removed attesters based on the latest commit to the committee.
function getAttesterCommittee() public view returns (CommitteeAttester[] memory) {
function getAttesterCommittee() external view returns (CommitteeAttester[] memory) {
uint256 len = nodeOwners.length;
CommitteeAttester[] memory committee = new CommitteeAttester[](len);
uint256 count = 0;
Expand All @@ -320,7 +320,7 @@ contract ConsensusRegistry is IConsensusRegistry, Initializable, Ownable2StepUpg

/// @notice Returns an array of `ValidatorAttr` structs representing the current attester committee.
/// @dev Collects active and non-removed validators based on the latest commit to the committee.
function getValidatorCommittee() public view returns (CommitteeValidator[] memory) {
function getValidatorCommittee() external view returns (CommitteeValidator[] memory) {
uint256 len = nodeOwners.length;
CommitteeValidator[] memory committee = new CommitteeValidator[](len);
uint256 count = 0;
Expand All @@ -347,7 +347,7 @@ contract ConsensusRegistry is IConsensusRegistry, Initializable, Ownable2StepUpg
return committee;
}

function numNodes() public view returns (uint256) {
function numNodes() external view returns (uint256) {
return nodeOwners.length;
}

Expand Down
2 changes: 2 additions & 0 deletions l2-contracts/contracts/interfaces/IConsensusRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,6 @@ interface IConsensusRegistry {
function getAttesterCommittee() external view returns (CommitteeAttester[] memory);

function getValidatorCommittee() external view returns (CommitteeValidator[] memory);

function numNodes() external view returns (uint256);
}
Loading