Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Unused import and immutable variable in `LoveToken`

Summary

Unnecessary immutable variable, which is never used.

Vulnerability Details

LoveToken contract has imported ISoulmate import and created the immutable variable named soulmateContract which is initialized in constructor. This variable is never used by the contract in any context and is obsolete.
This will only create extra bytecode for deployment, which cause high gas to deploy. It is better approach to remove any dead code.

Impact

Unused code will cause extra gas to deploy

Tools Used

Manual Review

Recommendations

update the contract as follows -

// existing code
- import {ISoulmate} from "./interface/ISoulmate.sol";
/// existing code
- ISoulmate public immutable soulmateContract;
/// existing code
constructor(
- ISoulmate _soulmateContract,
address _airdropVault,
address _stakingVault
) ERC20("LoveToken", "<3", 18) {
- soulmateContract = _soulmateContract;
airdropVault = _airdropVault;
stakingVault = _stakingVault;
}
/// existing code
Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.