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

Missing event emission in `ChoosingRam::selectRamIfNotSelected`, `Dusshra::withdraw` and `Dussehra::killRavana` function

Summary

Missing events reduce the transparency of the contracts, making it difficult to track important state changes off-chain.

Vulnerability Details

ChoosingRam::selectRamIfNotSelected - No event emission after Ram is selected.
Dusshra::withdraw- No event emission after Ram withdraws funds.
Dussehra::killRavana - No event emission after player killed Ravana

Impact

Low - The lack of event emissions in these functions reduces transparency, making it difficult to monitor significant actions off-chain.

Tools Used

  • Manual review

  • Static analysis

Recommendations

Add event emission
+ event RamSelected(address indexed ram, uint256 indexed tokenId);
+ event RavanaKilled(uint256 totalAmountGivenToRam);
+ event RewardWithdrawn(address indexed ram, uint256 amount);
function selectRamIfNotSelected() public RamIsNotSelected OnlyOrganiser {
// ... existing code ...
+ emit RamSelected(selectedRamAddress, random);
}
function killRavana() public RamIsSelected {
// ... existing code ...
+ emit RavanaKilled(totalAmountGivenToRam);
}
function withdraw() public RamIsSelected OnlyRam RavanKilled {
// ... existing code ...
+ emit RewardWithdrawn(msg.sender, amount);
}
Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/Gas/Invalid according to docs

Support

FAQs

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