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
maplesyrup
Gas optimizations Does not affect the contract in any harmful way. Suggestions allow for smart contract gas optimizations.
According to Slither analyzer documentation (https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant), the variable in contract Utils.sol called "one" or Utils.one can be set to a constant as it is considered a variable that does not change throughout the contract.
Slither Detectors:
constable-states:
Utils.one (contracts/Utils.sol, lines#11) should be constant
Code in contract:
uint public one = 10**18; <---- can be constant as it does not change
Console output (via Slither in JSON format):
"constable-states": [ "Utils.one (contracts/Utils.sol#11) should be constant\n" ],
Spartan Contracts Solidity (v 0.8.3) Slither Analyzer (v 0.8.0)
The text was updated successfully, but these errors were encountered:
maplesyrup issue #146
af9ccd1
SamusElderg
No branches or pull requests
Handle
maplesyrup
Vulnerability details
Impact
Gas optimizations
Does not affect the contract in any harmful way. Suggestions allow for smart contract gas optimizations.
Proof of Concept
According to Slither analyzer documentation (https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant), the variable in contract Utils.sol called "one" or Utils.one can be set to a constant as it is considered a variable that does not change throughout the contract.
Slither Detectors:
constable-states:
Utils.one (contracts/Utils.sol, lines#11) should be constant
Code in contract:
uint public one = 10**18; <---- can be constant as it does not change
Console output (via Slither in JSON format):
"constable-states": [
"Utils.one (contracts/Utils.sol#11) should be constant\n"
],
Tools Used
Spartan Contracts
Solidity (v 0.8.3)
Slither Analyzer (v 0.8.0)
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: