Omniscia AmpleSense Audit
StakingERC721 Code Style Findings
StakingERC721 Code Style Findings
SEC-01C: Variable Mutability Specifiers
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | StakingERC721.sol:L11-L14, L25-L28 |
Description:
The linked variables are assigned to only once during the contract's constructor
.
Example:
contracts/StakingERC721.sol
24constructor(IERC721 _tokenA, IERC721 _tokenB, IERC20 _ampl) {25 tokenA = _tokenA;26 tokenB = _tokenB;27 ampl = _ampl;28 stakingContractEth = new Distribute(0, IERC20(address(0)));29}
Recommendation:
We advise them to be set as immutable
greatly optimizing their read access gas cost.
Alleviation:
All linked variables have been properly set as immutable
greatly optimizing the codebase.