We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Risk: Gas optimization
Findings:
getVotingStage(uint256) should be declared external: - Gauge.getVotingStage(uint256) (contracts/Gauge.sol#163-171) Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/Gauge.sol#L163-L171
getFee(bool) should be declared external: - PairFactory.getFee(bool) (contracts/factories/PairFactory.sol#76-78) Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/factories/PairFactory.sol#L76-L78
setGovernor(address) should be declared external: - Voter.setGovernor(address) (contracts/Voter.sol#82-85) Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/Voter.sol#L82-L85
setEmergencyCouncil(address) should be declared external: - Voter.setEmergencyCouncil(address) (contracts/Voter.sol#87-90) Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/Voter.sol#L87-L90
whitelist(address) should be declared external: - Voter.whitelist(address) (contracts/Voter.sol#178-181) Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/Voter.sol#L178-L181
getPastVotes(address,uint256) should be declared external: - VotingEscrow.getPastVotes(address,uint256) (contracts/VotingEscrow.sol#1184-1199) Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/VotingEscrow.sol#L1184-L1199
delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32) should be declared external: - VotingEscrow.delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32) (contracts/VotingEscrow.sol#1354-1391) Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/VotingEscrow.sol#L1354-L1391
Recommendation: Change visibility to external Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external
The text was updated successfully, but these errors were encountered:
Deivitto issue #213
b50a87c
The finding will not save gas since 0.6.12
Sorry, something went wrong.
No branches or pull requests
Visibility declared as public an not used inside the contract can be declared external
Risk: Gas optimization
Findings:
getVotingStage(uint256) should be declared external:
- Gauge.getVotingStage(uint256) (contracts/Gauge.sol#163-171)
Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/Gauge.sol#L163-L171
getFee(bool) should be declared external:
- PairFactory.getFee(bool) (contracts/factories/PairFactory.sol#76-78)
Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/factories/PairFactory.sol#L76-L78
setGovernor(address) should be declared external:
- Voter.setGovernor(address) (contracts/Voter.sol#82-85)
Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/Voter.sol#L82-L85
setEmergencyCouncil(address) should be declared external:
- Voter.setEmergencyCouncil(address) (contracts/Voter.sol#87-90)
Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/Voter.sol#L87-L90
whitelist(address) should be declared external:
- Voter.whitelist(address) (contracts/Voter.sol#178-181)
Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/Voter.sol#L178-L181
getPastVotes(address,uint256) should be declared external:
- VotingEscrow.getPastVotes(address,uint256) (contracts/VotingEscrow.sol#1184-1199)
Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/VotingEscrow.sol#L1184-L1199
delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32) should be declared external:
- VotingEscrow.delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32) (contracts/VotingEscrow.sol#1354-1391)
Link: https://github.com/code-423n4/2022-05-velodrome/tree/main/contracts/contracts/VotingEscrow.sol#L1354-L1391
Recommendation: Change visibility to external
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-external
The text was updated successfully, but these errors were encountered: