Snowman Merkle Airdrop

AI First Flight #10
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: low
Likelihood: high
Invalid

[L-1] Missing events emission for `Snow::SnowEarned` and `Snow::FeeCollected`.

[L-1] Missing events emission for Snow::SnowEarned and Snow::FeeCollected.

Description
The events Snow::SnowEarned and Snow::FeeCollected are not emitted when the corresponding actions occur. This makes it difficult to track and audit the flow of Snow tokens and fees.

Impact
The lack of event emission reduces the transparency and traceability of the contract's operations, making it harder to monitor and verify the correct functioning of the system.

Recommended mitigation
Emit the Snow::SnowEarned event in the earnSnow function and the Snow::FeeCollected event in the collectFee function to ensure that these actions are properly logged and can be tracked on-chain.

Instances ```diff function earnSnow() external canFarmSnow { if (s_earnTimer != 0 && block.timestamp < (s_earnTimer + 1 weeks)) { revert S__Timer(); } _mint(msg.sender, 1);
    s_earnTimer = block.timestamp;
  •    emit SnowEarned(msg.sender, 1);
    

    }

```diff
function collectFee() external onlyCollector {
uint256 collection = i_weth.balanceOf(address(this));
// @audit- unchecked transfer =? use safetransfer or check returned value
i_weth.transfer(s_collector, collection);
(bool collected,) = payable(s_collector).call{value: address(this).balance}("");
require(collected, "Fee collection failed!!!");
+ emit FeeCollected(s_collector, collection);
}
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 1 hour ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!