LoveToken.sol
should be zero address checked. This would prevent any mishaps when deploying contracts.If an argument is passed with a zero address there is no check to prevent against this.
Although this the chance of this happening is low the impact would be high. If a contract was deployed with an incorrect argument for the constructor there is no way in the contract to correct this mistake. Depending on the deployment process this single contract might have to be re-deployed or even worse multiple contracts may have to be re-deployed.
Foundry
constructor(
ISoulmate _soulmateContract,
address _airdropVault,
address _stakingVault
) ERC20("LoveToken", "<3", 18) {
if(address(_soulmateContract) == 0 || _aidropVault == 0 || _stakingVault == 0) { revert; }
soulmateContract = _soulmateContract;
airdropVault = _airdropVault;
stakingVault = _stakingVault;
}
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.