The RockPaperScissors::setAdmin
function allows updating the admin address but does not emit an event to record this change. This reduces transparency and makes it harder to track admin changes off-chain, which can hinder monitoring and auditing efforts. Emitting an event is a best practice for important state changes, especially for privileged roles.
Found 1 Instances in src/RockPaperScissors.sol [Line: 477](src/RockPaperScissors.sol#L477)
Lack of an event for admin changes makes it difficult for external systems, auditors, or users to detect and track critical role transitions, potentially hiding unauthorized or malicious admin updates.
Foundry
Emit an AdminUpdated event whenever the admin address is changed. This ensures transparency, supports off-chain monitoring, and maintains a reliable audit trail for administrative changes.
Code suggestions or observations that do not pose a direct security risk.
Code suggestions or observations that do not pose a direct security risk.
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.